projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98f4e91
)
Also detect actual current runlevel
author
Jamie Cameron
<jcameron@webmin.com>
Mon, 28 Feb 2011 06:16:02 +0000
(22:16 -0800)
committer
Jamie Cameron
<jcameron@webmin.com>
Mon, 28 Feb 2011 06:16:02 +0000
(22:16 -0800)
http://www.virtualmin.com/node/17333
init/init-lib.pl
patch
|
blob
|
history
diff --git
a/init/init-lib.pl
b/init/init-lib.pl
index
8ce6ba9
..
675d614
100755
(executable)
--- a/
init/init-lib.pl
+++ b/
init/init-lib.pl
@@
-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);
}