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