X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/ae946ea18aac6176889a31b0e388fdebf2c671da..0f661400c526b3a6be1db208aa83cadf77dc44a8:/openwrt/package/base-files/default/etc/preinit?ds=inline diff --git a/openwrt/package/base-files/default/etc/preinit b/openwrt/package/base-files/default/etc/preinit index 88c8920c9..f82823ec9 100755 --- a/openwrt/package/base-files/default/etc/preinit +++ b/openwrt/package/base-files/default/etc/preinit @@ -16,4 +16,14 @@ fi mount_root ${FAILSAFE:+failsafe} +# automagically run firstboot +[ -z "$FAILSAFE" -a -z "$(nvram get no_root_swap)" ] && { + { mount|grep "on / type jffs2" 1>&-; } || firstboot +} + +grep sysfs /proc/filesystems >&- 2>&- && { + mkdir -p /sys + mount -t sysfs none /sys +} + exec /sbin/init