check if some /proc files exist, before using it, for systems without diag kernel...
[openwrt.git] / package / base-files / default / sbin / mount_root
index ae78ee4..32a6ee5 100755 (executable)
@@ -4,7 +4,7 @@ if [ "$1" != "failsafe" ]; then
        mount | grep jffs2 >&-
        if [ $? = 0 ] ; then
                if [ $(cat /proc/mtd | wc -l) = 6 ]; then
-                       echo 5 > /proc/sys/diag
+                       [ -f /proc/sys/diag ] && echo 5 > /proc/sys/diag
                        mtd unlock linux
                        mtd erase OpenWrt
                        jffs2root --move
This page took 0.02176 seconds and 4 git commands to generate.