allow ctrl-c to trigger preinit
[openwrt.git] / package / base-files / files / etc / preinit
index ddbb2f3..8c30fd8 100755 (executable)
@@ -29,7 +29,7 @@ if grep devfs /proc/filesystems > /dev/null; then
        M1=/dev/pty/m1
        HOTPLUG=/sbin/hotplug-call
 
-elif [ -x /sbin/hotplug ]; then
+elif [ -x /sbin/hotplug2 ]; then
        mount -t tmpfs tmpfs /dev -o size=512K
        mknod /dev/console c 5 1
        /sbin/hotplug2 --coldplug --set-rules-file /etc/hotplug2-init.rules
@@ -62,6 +62,8 @@ dd if=/dev/console of=/dev/null bs=1 count=0 >/dev/null 2>/dev/null && {
 exec <$M0 >$M1 2>&0
 
 echo "- preinit -"
+echo "Press CTRL-C for failsafe"
+trap 'FAILSAFE=true' INT
 trap 'FAILSAFE=true' USR1
 [ -e /etc/preinit.arch ] && . /etc/preinit.arch
 set_state preinit
@@ -82,6 +84,5 @@ if [ -z "$INITRAMFS" ]; then
 
        echo "- init -"
        
-       killall hotplug2
        exec /sbin/init
 fi
This page took 0.027904 seconds and 4 git commands to generate.