projects
/
openwrt
/
svn-archive
/
archive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
some fixes/cleanups for the init scripts
[openwrt/svn-archive/archive.git]
/
openwrt
/
package
/
base-files
/
default
/
etc
/
preinit
diff --git
a/openwrt/package/base-files/default/etc/preinit
b/openwrt/package/base-files/default/etc/preinit
index 34de88c60212480d27bf9dc6516ad1edbe6a9fba..88c8920c9416dfdd867f2160d6f8b09526b1f3b2 100755
(executable)
--- a/
openwrt/package/base-files/default/etc/preinit
+++ b/
openwrt/package/base-files/default/etc/preinit
@@
-3,11
+3,11
@@
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
mount none /proc -t proc
insmod diag
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
mount none /proc -t proc
insmod diag
-echo 0x01 > /proc/sys/diag
+
[ -f /proc/sys/diag ] &&
echo 0x01 > /proc/sys/diag
sleep 1
sleep 1
-if [ $(cat /proc/sys/reset) = 1 -o "$(nvram get failsafe)" = 1 ]; then
+if [
-f /proc/sys/reset ] && [
$(cat /proc/sys/reset) = 1 -o "$(nvram get failsafe)" = 1 ]; then
export FAILSAFE=true
export FAILSAFE=true
- [ "$(nvram get boot_wait)" != "on" ] && {
+ [
-x /usr/sbin/nvram -a
"$(nvram get boot_wait)" != "on" ] && {
nvram set boot_wait=on
nvram commit
}
nvram set boot_wait=on
nvram commit
}