X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/ae946ea18aac6176889a31b0e388fdebf2c671da..4b908797b0d55eafa684bf8fe369f2887e7f257d:/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..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