X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/efbc756b232a92ad8176ed8cc3d37846939c8245..028409fa8bc55ed8ba506bf1678510430cf25e15:/package/base-files/default/etc/preinit diff --git a/package/base-files/default/etc/preinit b/package/base-files/default/etc/preinit index 88c8920c9..ac9039ca7 100755 --- a/package/base-files/default/etc/preinit +++ b/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