check if /proc/sys/reset exist, from sven-ola
authorWaldemar Brodkorb <mail@waldemar-brodkorb.de>
Thu, 29 Sep 2005 12:02:01 +0000 (12:02 +0000)
committerWaldemar Brodkorb <mail@waldemar-brodkorb.de>
Thu, 29 Sep 2005 12:02:01 +0000 (12:02 +0000)
SVN-Revision: 2002

openwrt/package/base-files/default/etc/preinit

index 34de88c60212480d27bf9dc6516ad1edbe6a9fba..ff9bb4b10a7930e4d3b72d1be5343b3d46e6a595 100755 (executable)
@@ -5,7 +5,7 @@ mount none /proc -t proc
 insmod diag
 echo 0x01 > /proc/sys/diag
 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
        [ "$(nvram get boot_wait)" != "on" ] && {
                nvram set boot_wait=on