[pakcage] simplify action handling in rc.common (#5558)
[openwrt.git] / package / base-files / files / etc / preinit
index 11b9100..4e706f1 100755 (executable)
@@ -11,7 +11,7 @@ failsafe() {
        [ -n "$ifname" ] && grep "$ifname" /proc/net/dev >/dev/null && {
                failsafe_ip
                netmsg 192.168.1.255 "Entering Failsafe!"
-               telnetd -l /bin/login <> /dev/null 2>&1
+               telnetd -l /bin/login.sh <> /dev/null 2>&1
        }
        lock /tmp/.failsafe
        ash --login
@@ -32,8 +32,8 @@ if grep devfs /proc/filesystems > /dev/null; 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
-       /sbin/hotplug2 --no-coldplug --persistent --set-rules-file /etc/hotplug2-init.rules &
+       /sbin/hotplug2 --set-worker /lib/hotplug2/worker_fork.so --set-rules-file /etc/hotplug2-init.rules --no-persistent --set-coldplug-cmd /sbin/udevtrigger
+       /sbin/hotplug2 --set-worker /lib/hotplug2/worker_fork.so --set-rules-file /etc/hotplug2-init.rules --persistent &
        M0=/dev/ptmx
        M1=/dev/ptmx
        HOTPLUG=
@@ -68,6 +68,7 @@ trap 'FAILSAFE=true' USR1
 [ -e /etc/preinit.arch ] && . /etc/preinit.arch
 set_state preinit
 echo "$HOTPLUG" > /proc/sys/kernel/hotplug
+export FAILSAFE
 eval ${FAILSAFE:+failsafe}
 lock -w /tmp/.failsafe
 
This page took 0.023628 seconds and 4 git commands to generate.