diff options
Diffstat (limited to 'package/base-files/default/etc/preinit')
-rwxr-xr-x | package/base-files/default/etc/preinit | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/package/base-files/default/etc/preinit b/package/base-files/default/etc/preinit index 88c8920c94..ac9039ca71 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 |