#!/usr/bin/perl -w # please develop with -w #use diagnostics; use Install; use Getopt::Long; 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"); my ($auto_install_file,$auto_install); GetOptions( 'i:s' => \$auto_install_file, ); $auto_install = read_autoinstall_file($auto_install_file) if $auto_install_file; Install::setetcdir $etcdir; unless (-d 'intranet-html') { print <{NoPressEnter}); showmessage(getmessage('Completed', [ Install::getservername(), Install::getintranetport(), Install::getservername(), Install::getopacport()]), 'PressEnter'); if (-f "kohareporter") { my $reply=showmessage('Would you like to complete a survey about your library?', 'yn', 'y'); if ($reply=~/y/i) { system("perl kohareporter"); } }