mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-01-27 14:21:06 +02:00
package/base-files: set state to 'preinit' before preinit.arch is used, and set state to 'failsafe' when entering failsafe mode
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17517 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
7252622410
commit
e325b77df1
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_NAME:=base-files
|
PKG_NAME:=base-files
|
||||||
PKG_RELEASE:=26
|
PKG_RELEASE:=27
|
||||||
|
|
||||||
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ failsafe_ip() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
failsafe() {
|
failsafe() {
|
||||||
|
set_state failsafe
|
||||||
[ -n "$ifname" ] && grep "$ifname" /proc/net/dev >/dev/null && {
|
[ -n "$ifname" ] && grep "$ifname" /proc/net/dev >/dev/null && {
|
||||||
failsafe_ip
|
failsafe_ip
|
||||||
netmsg 192.168.1.255 "Entering Failsafe!"
|
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
|
exec <$M0 >$M1 2>&0
|
||||||
|
|
||||||
echo "- preinit -"
|
echo "- preinit -"
|
||||||
|
set_state preinit
|
||||||
echo "Press CTRL-C for failsafe"
|
echo "Press CTRL-C for failsafe"
|
||||||
trap 'FAILSAFE=true' INT
|
trap 'FAILSAFE=true' INT
|
||||||
trap 'FAILSAFE=true' USR1
|
trap 'FAILSAFE=true' USR1
|
||||||
@ -74,7 +76,6 @@ if [ -e /etc/preinit.arch ]; then
|
|||||||
else
|
else
|
||||||
sleep 2
|
sleep 2
|
||||||
fi
|
fi
|
||||||
set_state preinit
|
|
||||||
echo "$HOTPLUG" > /proc/sys/kernel/hotplug
|
echo "$HOTPLUG" > /proc/sys/kernel/hotplug
|
||||||
export FAILSAFE
|
export FAILSAFE
|
||||||
eval ${FAILSAFE:+failsafe}
|
eval ${FAILSAFE:+failsafe}
|
||||||
@ -92,6 +93,6 @@ if [ -z "$INITRAMFS" ]; then
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo "- init -"
|
echo "- init -"
|
||||||
|
|
||||||
exec /sbin/init
|
exec /sbin/init
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user