summaryrefslogtreecommitdiffstats
path: root/package/base-files/files/etc
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-08-21 18:23:57 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-08-21 18:23:57 +0000
commit6c1223e18923b55896f7ab30bec5374343ba04ef (patch)
treef22cbba5ec9be377be1109f82143b39ce1cf49a8 /package/base-files/files/etc
parentb7b479ae3f4d986ab8ca6a4ea45c4a68c1d77fa2 (diff)
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
Diffstat (limited to 'package/base-files/files/etc')
-rwxr-xr-xpackage/base-files/files/etc/preinit8
1 files changed, 8 insertions, 0 deletions
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 -"