summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/slugos-init/files/boot/flash10
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/slugos-init/files/boot/flash b/packages/slugos-init/files/boot/flash
index 1390597ce7..01c20e963a 100644
--- a/packages/slugos-init/files/boot/flash
+++ b/packages/slugos-init/files/boot/flash
@@ -11,9 +11,17 @@ leds beep
. /etc/default/functions
leds boot system
-test -x /sbin/init && exec /sbin/init
+if [ -x /sbin/init ]
+then
+ umount /proc 2>/dev/null
+ umount /sys 2>/dev/null
+ exec /sbin/init
+fi
# fallback if /sbin/init has been deleted (bad!)
+# Mount required filesystems if necessary
+[ -e /proc/cpuinfo ] || mount -t proc proc /proc
+[ -e /sys/class ] || mount -t sysfs sysfs /sys
leds boot system panic
exec <>/dev/console >&0 2>&0
test -x /sbin/sulogin && exec /sbin/sulogin