--- doc/install/linux/install.pl 2019/05/26 22:19:35 1.53 +++ doc/install/linux/install.pl 2019/07/02 19:40:35 1.55 @@ -77,7 +77,7 @@ if (!open(LOG,">>loncapa_install.log")) &mt('Stopping execution.')."\n"; exit; } else { - print LOG '$Id: install.pl,v 1.53 2019/05/26 22:19:35 raeburn Exp $'."\n"; + print LOG '$Id: install.pl,v 1.55 2019/07/02 19:40:35 raeburn Exp $'."\n"; } # @@ -166,7 +166,18 @@ sub get_user_selection { sub get_distro { my ($distro,$gotprereqs,$updatecmd,$packagecmd,$installnow,$unknown); $packagecmd = '/bin/rpm -q LONCAPA-prerequisites '; - if (-e '/etc/redhat-release') { + if (-e '/etc/oracle-release') { + open(IN,'; + chomp($versionstring); + close(IN); + if ($versionstring =~ /^Oracle Linux Server release (\d+)/) { + my $version = $1; + $distro = 'oracle'.$1; + $updatecmd = 'yum install LONCAPA-prerequisites'; + $installnow = 'yum -y install LONCAPA-prerequisites'; + } + } elsif (-e '/etc/redhat-release') { open(IN,'; chomp($versionstring); @@ -196,6 +207,10 @@ sub get_distro { $distro = 'rhes'.$1; $updatecmd = 'yum install LONCAPA-prerequisites'; $installnow = 'yum -y install LONCAPA-prerequisites'; + } elsif ($versionstring =~ /Red Hat Enterprise Linux release (\d+)/) { + $distro = 'rhes'.$1; + $updatecmd = 'dnf install LONCAPA-prerequisites'; + $installnow = 'dnf -y install LONCAPA-prerequisites'; } elsif ($versionstring =~ /CentOS(?:| Linux) release (\d+)/) { $distro = 'centos'.$1; $updatecmd = 'yum install LONCAPA-prerequisites'; @@ -308,7 +323,7 @@ sub get_distro { $unknown = 1; } } else { - print &mt('Unknown installation: expecting a debian, ubuntu, suse, sles, redhat, fedora or scientific linux system.')."\n"; + print &mt('Unknown installation: expecting a debian, ubuntu, suse, sles, redhat, fedora, scientific linux, or oracle linux system.')."\n"; } } return ($distro,$packagecmd,$updatecmd,$installnow); @@ -466,8 +481,12 @@ sub check_locale { 'sudo update-locale LANG=en_US.UTF-8'; } elsif ($distro =~ /^(suse|sles)/) { $command = 'yast language'; - } else { + } elsif (-e '/usr/bin/system-config-language') { $command = 'system-config-language'; + } elsif (-e '/usr/bin/localectl') { + $command = 'localectl set-locale en_US.UTF-8'; + } else { + $command = 'No standard command found'; } } last; @@ -739,6 +758,9 @@ sub chkconfig { $uses_systemctl{'cups'} = 1; $daemon{'mysql'} = 'mariadb'; } + if ($version >= 8) { + $daemon{'ntp'} = 'chronyd'; + } } my $nocheck; if (! -x $checker_bin) {