move firstboot to preinit for now (until a better solution is implemented), required...
[openwrt/staging/mkresin.git] / openwrt / package / base-files / default / etc / preinit
index 88c8920c9416dfdd867f2160d6f8b09526b1f3b2..ac9039ca7175f5d7681b3704a118877827e57764 100755 (executable)
@@ -16,4 +16,9 @@ fi
 
 mount_root ${FAILSAFE:+failsafe}
 
+# automagically run firstboot
+[ -z "$FAILSAFE" -a -z "$(nvram get no_root_swap)" ] && {
+       { mount|grep "on / type jffs2" 1>&-; } || firstboot
+}
+
 exec /sbin/init