2007-03-02 09:23:36 +08:00
|
|
|
#!/bin/sh
|
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
|
2007-05-10 22:37:47 +08:00
|
|
|
. /etc/diag.sh
|
|
|
|
|
|
|
|
failsafe() {
|
|
|
|
lock /tmp/.failsafe
|
|
|
|
ash --login
|
|
|
|
}
|
|
|
|
|
2007-03-04 06:32:13 +08:00
|
|
|
[ -e /etc/preinit.arch ] && . /etc/preinit.arch
|
2007-05-10 22:37:47 +08:00
|
|
|
|
|
|
|
set_state preinit
|
|
|
|
|
2007-03-04 06:32:13 +08:00
|
|
|
mount_root ${FAILSAFE:+failsafe}
|
2007-05-10 22:37:47 +08:00
|
|
|
|
|
|
|
eval ${FAILSAFE:+failsafe}
|
|
|
|
lock -w /tmp/.failsafe
|
|
|
|
|
2007-03-02 09:23:36 +08:00
|
|
|
exec /sbin/init
|