X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/c49b0723e2aa7882aedc81ae213046f433fd4c20..3406861c45898997e1e144d72f32641129f697c8:/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 -"