--- doc/install/linux/install.pl 2011/04/23 19:04:42 1.7 +++ doc/install/linux/install.pl 2011/04/23 23:35:19 1.8 @@ -72,7 +72,7 @@ if (!open(LOG,">>loncapa_install.log")) &mt('Stopping execution.')."\n"; exit; } else { - print LOG '$Id: install.pl,v 1.7 2011/04/23 19:04:42 raeburn Exp $'."\n"; + print LOG '$Id: install.pl,v 1.8 2011/04/23 23:35:19 raeburn Exp $'."\n"; } # @@ -293,7 +293,7 @@ sub check_prerequisites { } else { my $line = ; chomp($line); - if ($line =~ /^LONCAPA-prerequisites\-([\d\-]+)\.(\w+)$/) { + if ($line =~ /^LONCAPA\-prerequisites\-([\d\-]+)\.(?:[.\w]+)$/) { $gotprereqs = $1; } } @@ -307,12 +307,19 @@ sub check_prerequisites { sub check_locale { my ($distro) = @_; - my ($fh,$command); + my ($fh,$langvar,$command); + $langvar = 'LANG'; if ($distro =~ /^(ubuntu|debian)/) { if (!open($fh,"; chomp(@data); foreach my $item (@data) { - if ($item =~ /^LANG=\"([^\"]*)\"/) { + if ($item =~ /^\Q$langvar\E=\"([^\"]*)\"/) { my $default = $1; if ($default ne 'en_US.UTF-8') { if ($distro =~ /^debian/) { @@ -386,7 +393,7 @@ sub check_required { } } ($recommended{'firewall'},$apachefw) = &chkfirewall($distro); - ($recommended{'runlevels'},$tostop) = &chkconfig($distro); + ($recommended{'runlevels'},$tostop) = &chkconfig($distro,$instdir); $recommended{'apache'} = &chkapache($distro,$instdir); $recommended{'stopsrvcs'} = &chksrvcs($distro,$tostop); ($recommended{'download'},$downloadstatus,$filetouse,$production,$testing) @@ -442,7 +449,7 @@ sub check_mysql_running { } sub chkconfig { - my ($distro) = @_; + my ($distro,$instdir) = @_; my (%needfix,%tostop); my $checker_bin = '/sbin/chkconfig'; my %daemon = ( @@ -459,6 +466,7 @@ sub chkconfig { @norunlevels = qw/0 2 1 6/; $daemon{'mysql'} = 'mysql'; $daemon{'apache'} = 'apache2'; + $daemon{'ntp'} = 'ntp'; if ($distro =~ /^(suse|sles)9/) { $daemon{'apache'} = 'apache'; } @@ -534,7 +542,9 @@ sub chkconfig { $major = $version; } if ($major > 10) { - $needfix{'insserv'} = &check_SuSEfirewall2_setup(); + if (&check_SuSEfirewall2_setup($instdir)) { + $needfix{'insserv'} = 1; + } } } return (\%needfix,\%tostop); @@ -603,7 +613,7 @@ sub chkapache { } elsif ($distro =~ /^(?:suse|sles)([\d\.]+)$/) { my $apache = 'apache'; if ($1 >= 10) { - my $apache = 'apache2'; + $apache = 'apache2'; } if (!-e "$instdir/default-server.conf") { $fixapache = 0; @@ -1474,6 +1484,8 @@ sub kill_extra_services { if (($distro =~ /^ubuntu/) && ($version <= 8)) { $daemon = 'cupsys'; } + } elsif ($distro =~ /^(?:suse|sles)/) { + $daemon = 'cups'; } } &print_and_log(`/etc/init.d/$daemon stop`);