#!/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; } elsif (open(INPUT, "; } } Install::setdomainname $domainname; ############################################### # SET THE etcdir ENVIRONMENT VAR INSTEAD # ############################################### my $etcdir = $ENV{etcdir}||'/etc'; system("mkdir -p $etcdir"); Install::setetcdir $etcdir; unless (-d 'intranet-html') { print <