summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwbx <wbx@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-07-06 10:36:33 +0000
committerwbx <wbx@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-07-06 10:36:33 +0000
commitc053c3ed7778d6088c2d3d32ade44a509111793d (patch)
treedac15d4276427218f5e0903552872ebbf6e591b3
parent3a2df3f0f3bb2804252664cf4388db393dae1465 (diff)
set boot_wait to on in the earliest possible moment. this makes webupgrade safer and also nvram resets. idea and patch from Georg Lucas
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1358 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rwxr-xr-xtarget/default/target_skeleton/etc/preinit4
1 files changed, 4 insertions, 0 deletions
diff --git a/target/default/target_skeleton/etc/preinit b/target/default/target_skeleton/etc/preinit
index 7a02e3121..061673035 100755
--- a/target/default/target_skeleton/etc/preinit
+++ b/target/default/target_skeleton/etc/preinit
@@ -1,4 +1,8 @@
#!/bin/sh
+[ "$(/usr/sbin/nvram get boot_wait)" != "on" ] && {
+ /usr/sbin/nvram set boot_wait=on
+ /usr/sbin/nvram commit
+}
mount none /proc -t proc
insmod diag
echo 0x01 > /proc/sys/diag