From 6c1223e18923b55896f7ab30bec5374343ba04ef Mon Sep 17 00:00:00 2001 From: nbd Date: Tue, 21 Aug 2007 18:23:57 +0000 Subject: add sysupgrade script for config preserving system upgrades. only implemented for x86-2.6 at the moment, but can be ported to other platforms easily git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8456 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/files/etc/preinit | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'package/base-files/files/etc/preinit') diff --git a/package/base-files/files/etc/preinit b/package/base-files/files/etc/preinit index c11732f7a7..452209ff90 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 -" -- cgit v1.2.3