version 1.1, 2004/12/16 20:14:37
|
version 1.6, 2007/12/07 06:01:06
|
Line 38 http://www.lon-capa.org/
|
Line 38 http://www.lon-capa.org/
|
my $chkconfig_bin = '/sbin/chkconfig'; |
my $chkconfig_bin = '/sbin/chkconfig'; |
exit if (! -x $chkconfig_bin); |
exit if (! -x $chkconfig_bin); |
|
|
my $command = $chkconfig_bin.' --list httpd'; |
my $webserver = 'httpd'; |
|
my @runlevels = qw/3 4 5/; |
|
if ('<DIST />' eq 'suse9.3' || '<DIST />' eq 'suse9.2' || '<DIST />' eq 'sles9') { |
|
$webserver = 'apache'; |
|
@runlevels = qw/3 5/; |
|
} elsif ('<DIST />' eq 'sles10' || '<DIST />' eq 'suse10.1' || '<DIST />' eq 'suse10.2' || '<DIST />' eq 'suse10.3') { |
|
$webserver = 'apache2'; |
|
} |
|
my $command = $chkconfig_bin.' --list '.$webserver; |
my $results = `$command`; |
my $results = `$command`; |
if ($results eq '') { |
if ($results eq '') { |
print "**** WARNING: httpd is not set to run on boot.$/". |
print "**** WARNING: $webserver is not set to run on boot.$/". |
" Execute the following commands to fix this:".$/. |
" Execute the following commands to fix this:".$/. |
" $chkconfig_bin --add httpd".$/. |
" $chkconfig_bin --add $webserver".$/. |
" $chkconfig_bin httpd on".$/; |
" $chkconfig_bin $webserver on".$/; |
} else { |
} else { |
my %httpd_runlevels; |
my %httpd_runlevels; |
for (my $rl = 0;$rl <=6;$rl++) { |
for (my $rl = 0;$rl <=6;$rl++) { |
Line 52 if ($results eq '') {
|
Line 60 if ($results eq '') {
|
} |
} |
# |
# |
my $warning; |
my $warning; |
foreach my $rl (qw/3 4 5/) { |
foreach my $rl (@runlevels) { |
if (! exists($httpd_runlevels{$rl}) ) { |
if (! exists($httpd_runlevels{$rl}) ) { |
$warning .= |
$warning .= |
"**** WARNING: httpd is not set to run at runlevel $rl".$/; |
"**** WARNING: $webserver is not set to run at runlevel $rl".$/; |
} |
} |
} |
} |
if ($warning) { |
if ($warning) { |
print $warning. |
print $warning. |
" Execute the following command to fix this:".$/. |
" Execute the following command to fix this:".$/. |
" /sbin/chkconfig httpd on ".$/; |
" /sbin/chkconfig $webserver on ".$/; |
} |
} |
} |
} |
|
|
Line 79 if ($results eq '') {
|
Line 87 if ($results eq '') {
|
} |
} |
# |
# |
$warning = ''; |
$warning = ''; |
foreach my $rl (qw/3 4 5/) { |
foreach my $rl (@runlevels) { |
if (! exists($loncontrol_runlevels{$rl})) { |
if (! exists($loncontrol_runlevels{$rl})) { |
$warning .= |
$warning .= |
"**** WARNING: loncontrol is not set to run at runlevel $rl\n"; |
"**** WARNING: loncontrol is not set to run at runlevel $rl\n"; |