summaryrefslogtreecommitdiff
path: root/packages/altboot/files/init.altboot
diff options
context:
space:
mode:
Diffstat (limited to 'packages/altboot/files/init.altboot')
-rw-r--r--packages/altboot/files/init.altboot8
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/altboot/files/init.altboot b/packages/altboot/files/init.altboot
index ed95ce1c9c..22f3e86e83 100644
--- a/packages/altboot/files/init.altboot
+++ b/packages/altboot/files/init.altboot
@@ -283,10 +283,12 @@ wait_for_input() {
}
# * * * * * * This is the main function * * * * * *
-
-if test -f /proc/cmdline -a "$1" != "-force"
+# Note: this is positivly ugly. If someone knows a better way to detect wheter
+# we are already booted into a runlevel _without_ reading /var and / or using `runlevel`
+# PLEASE let me know.
+if test -f /proc/cmdline -a "`ps ax|wc -l|tr -d " "`" -gt 30 -a "$1" != "-force"
then
- echo "altboot: Using real init [$REAL_INIT] [$*] *" >/dev/tty1
+ echo "altboot: Using real init [$REAL_INIT] [$*] [`ps ax|wc -l|tr -d " "`] *" >/dev/tty1
exec $REAL_INIT $*
# exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1
exit 0