X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/ae946ea18aac6176889a31b0e388fdebf2c671da..4bb342946e09b8aabe702770055ec09985e78d1e:/openwrt/package/base-files/default/etc/preinit diff --git a/openwrt/package/base-files/default/etc/preinit b/openwrt/package/base-files/default/etc/preinit index 88c8920c9..ac9039ca7 100755 --- a/openwrt/package/base-files/default/etc/preinit +++ b/openwrt/package/base-files/default/etc/preinit @@ -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