projects
/
openwrt.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
bugfix
[openwrt.git]
/
package
/
base-files
/
files
/
etc
/
preinit
1
#!/bin/sh
2
# Copyright (C) 2006 OpenWrt.org
3
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
4
. /etc/diag.sh
5
6
failsafe() {
7
lock /tmp/.failsafe
8
ash --login
9
}
10
11
[ -e /etc/preinit.arch ] && . /etc/preinit.arch
12
13
set_state preinit
14
15
mount_root ${FAILSAFE:+failsafe}
16
17
eval ${FAILSAFE:+failsafe}
18
lock -w /tmp/.failsafe
19
20
exec /sbin/init