#!/usr/bin/perl -w # please develop with -w #use diagnostics; use Install; use strict; # please develop with the strict pragma use vars qw( $input ); Install::setlanguage 'en'; my $domainname = `hostname`; # Note: must not have any arguments (portability) if ($domainname =~ /^[^\s\.]+\.([-a-z0-9\.]+)$/) { $domainname = $1; } else { undef $domainname; if (open(INPUT, ") { $domainname = $1 if /^domain\s+([-a-z0-9\.]+)\s*$/i; last if defined $domainname; } close INPUT; } } Install::setdomainname $domainname; my $etcdir = '/etc'; Install::setetcdir $etcdir; unless ($< == 0) { print "You must be root to run this script.\n"; exit 1; } unless (-d 'intranet-html') { print <