package/base-files: set state to 'preinit' before preinit.arch is used, and set state...
authorGabor Juhos <juhosg@openwrt.org>
Sat, 5 Sep 2009 18:44:48 +0000 (18:44 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Sat, 5 Sep 2009 18:44:48 +0000 (18:44 +0000)
SVN-Revision: 17517

package/base-files/Makefile
package/base-files/files/etc/preinit

index 9e395bf199db5e64d7a283ef2ce7a5e9076d1104..95fa13114d46adbe250f88147753ffaa78f54edd 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=26
+PKG_RELEASE:=27
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
 
index cf042b47bf1e85b6a09aa6694ccc14c0706c2b9b..688fca075e91c82abef2bc79c0b567ef6ac1accc 100755 (executable)
@@ -8,6 +8,7 @@ failsafe_ip() {
 }
 
 failsafe() {
+       set_state failsafe
        [ -n "$ifname" ] && grep "$ifname" /proc/net/dev >/dev/null && {
                failsafe_ip
                netmsg 192.168.1.255 "Entering Failsafe!"
@@ -66,6 +67,7 @@ dd if=/dev/console of=/dev/null bs=1 count=0 >/dev/null 2>/dev/null && {
 exec <$M0 >$M1 2>&0
 
 echo "- preinit -"
+set_state preinit
 echo "Press CTRL-C for failsafe"
 trap 'FAILSAFE=true' INT
 trap 'FAILSAFE=true' USR1
@@ -74,7 +76,6 @@ if [ -e /etc/preinit.arch ]; then
 else
        sleep 2
 fi
-set_state preinit
 echo "$HOTPLUG" > /proc/sys/kernel/hotplug
 export FAILSAFE
 eval ${FAILSAFE:+failsafe}
@@ -92,6 +93,6 @@ if [ -z "$INITRAMFS" ]; then
        }
 
        echo "- init -"
-       
+
        exec /sbin/init
 fi