--- doc/install/linux/install.pl 2013/01/06 23:04:07 1.24 +++ doc/install/linux/install.pl 2013/12/11 15:37:57 1.27 @@ -72,7 +72,7 @@ if (!open(LOG,">>loncapa_install.log")) &mt('Stopping execution.')."\n"; exit; } else { - print LOG '$Id: install.pl,v 1.24 2013/01/06 23:04:07 raeburn Exp $'."\n"; + print LOG '$Id: install.pl,v 1.27 2013/12/11 15:37:57 raeburn Exp $'."\n"; } # @@ -339,13 +339,15 @@ sub check_locale { my @data = <$fh>; chomp(@data); foreach my $item (@data) { - if ($item =~ /^\Q$langvar\E=\"([^\"]*)\"/) { + if ($item =~ /^\Q$langvar\E=\"?([^\"]*)\"?/) { my $default = $1; if ($default ne 'en_US.UTF-8') { if ($distro =~ /^debian/) { - $command = 'dpkg-reconfigure locales'; + $command = 'locale-gen en_US.UTF-8'."\n". + 'update-locale LANG=en_US.UTF-8'; } elsif ($distro =~ /^ubuntu/) { - $command = 'sudo set-language-env -E'; + $command = 'sudo locale-gen en_US.UTF-8'."\n". + 'sudo update-locale LANG=en_US.UTF-8'; } elsif ($distro =~ /^(suse|sles)/) { $command = 'yast language'; } else { @@ -503,6 +505,11 @@ sub chkconfig { if ($distro =~ /^(suse|sles)9/) { $daemon{'apache'} = 'apache'; } + if ($distro =~ /^suse(\d+)/) { + if ($1 > 11) { + $uses_systemctl{'apache'} = 1; + } + } } elsif ($distro =~ /^(?:debian|ubuntu)(\d+)/) { my $version = $1; @runlevels = qw/2 3 4 5/; @@ -514,7 +521,7 @@ sub chkconfig { if (($distro =~ /^ubuntu/) && ($version <= 8)) { $daemon{'cups'} = 'cupsys'; } - } elsif ($distro =~ /^(?:fedora)(\d+)/) { + } elsif ($distro =~ /^fedora(\d+)/) { my $version = $1; if ($version >= 15) { $uses_systemctl{'ntp'} = 1;