sanity check
authorMike Baker <mbm@openwrt.org>
Sun, 26 Mar 2006 11:25:14 +0000 (11:25 +0000)
committerMike Baker <mbm@openwrt.org>
Sun, 26 Mar 2006 11:25:14 +0000 (11:25 +0000)
SVN-Revision: 3489

openwrt/package/base-files/default/bin/firstboot

index 1f03b526244c1956b693173296c7e76bd1c8376d..fbace811c9115ca8dcaa9ec04da332445b60262f 100755 (executable)
@@ -53,6 +53,12 @@ mountdp() { # <device> <mount_point> <ignored> <fs>
        exit 0
 }
 
+[ -z "$rom" ] && {
+       echo "You do not have a squashfs partition; aborting"
+       echo "(firstboot cannot be run on jffs2 based firmwares)"
+       exit 1
+}
+
 [ "$1" = "switch2jffs" ] && {
        #2nd stage
        mtd erase OpenWrt
@@ -70,12 +76,6 @@ mountdp() { # <device> <mount_point> <ignored> <fs>
 }
 
 # script run manually
-[ -z "$rom" ] && {
-       echo "You do not have a squashfs partition; aborting"
-       echo "(firstboot cannot be run on jffs2 based firmwares)"
-       exit 1
-}
-
 [ \! -z "$jffs" ] && {
        echo "firstboot has already been run"
        echo "jffs2 partition is mounted, only resetting files"