X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/c49b0723e2aa7882aedc81ae213046f433fd4c20..5e1f0b5bb07f841701341a9eaad5d14d2ce791e8:/package/base-files/files/etc/preinit diff --git a/package/base-files/files/etc/preinit b/package/base-files/files/etc/preinit index c11732f7a..452209ff9 100755 --- a/package/base-files/files/etc/preinit +++ b/package/base-files/files/etc/preinit @@ -60,6 +60,14 @@ echo "$HOTPLUG" > /proc/sys/kernel/hotplug eval ${FAILSAFE:+failsafe} lock -w /tmp/.failsafe mount_root +[ -f /sysupgrade.tgz ] && { + echo "- config restore -" + cd / + mv sysupgrade.tgz /tmp + tar xzf /tmp/sysupgrade.tgz + rm -f /tmp/sysupgrade.tgz + sync +} echo "- init -"