--- doc/install/linux/install.pl 2011/10/25 02:03:16 1.23 +++ doc/install/linux/install.pl 2013/04/05 14:26:25 1.26 @@ -72,7 +72,7 @@ if (!open(LOG,">>loncapa_install.log")) &mt('Stopping execution.')."\n"; exit; } else { - print LOG '$Id: install.pl,v 1.23 2011/10/25 02:03:16 raeburn Exp $'."\n"; + print LOG '$Id: install.pl,v 1.26 2013/04/05 14:26:25 raeburn Exp $'."\n"; } # @@ -320,6 +320,16 @@ sub check_locale { '/etc/sysconfig/language'); } $langvar = 'RC_LANG'; + } elsif ($distro =~ /^fedora(\d+)/) { + if ($1 >= 18) { + if (!open($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 { @@ -493,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/; @@ -504,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;