rename -brcm-2.4 preinit files to -brcm, as they're shared with brcm47xx
[openwrt/svn-archive/archive.git] / target / linux / brcm-2.4 / base-files / lib / preinit / 20_failsafe_set_boot_wait_brcm
diff --git a/target/linux/brcm-2.4/base-files/lib/preinit/20_failsafe_set_boot_wait_brcm b/target/linux/brcm-2.4/base-files/lib/preinit/20_failsafe_set_boot_wait_brcm
new file mode 100644 (file)
index 0000000..da721b8
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+. /etc/functions.sh
+
+set_boot_wait() {
+       [ -x "/usr/sbin/nvram" ] && {
+               [ "$(nvram get boot_wait)" != "on" ] && {
+                       nvram set boot_wait=on
+                       nvram commit
+               }
+       }
+}
+
+boot_hook_add failsafe set_boot_wait