mirror of
https://github.com/webmin/webmin.git
synced 2026-08-17 21:00:28 +01:00
Also detect actual current runlevel
http://www.virtualmin.com/node/17333
This commit is contained in:
@@ -369,6 +369,13 @@ if ($config{"inittab_rl_$rv[0]"}) {
|
||||
@rv = split(/,/, $config{"inittab_rl_$rv[0]"});
|
||||
}
|
||||
push(@rv, $config{'inittab_extra'});
|
||||
|
||||
# Add current runlevel. This is needed on EC2, as the boot runlevel can be
|
||||
# 4 even if inittab says 3!
|
||||
local $out = &backquote_command("who -r 2>/dev/null");
|
||||
if (!$? && $out =~ /run-level\s+(\d+)/) {
|
||||
push(@rv, $1);
|
||||
}
|
||||
return &unique(@rv);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user