aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/etc/preinit
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-08-21 18:23:57 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-08-21 18:23:57 +0000
commit1e38527a525ca2e4dbe3a53dad63669773d3d15c (patch)
tree6914285134a096e80ea7cc6fe3578ee2a23ab50e /package/base-files/files/etc/preinit
parentba05b57573eaf3272997892eb521451b670c4d5e (diff)
downloadupstream-1e38527a525ca2e4dbe3a53dad63669773d3d15c.tar.gz
upstream-1e38527a525ca2e4dbe3a53dad63669773d3d15c.tar.bz2
upstream-1e38527a525ca2e4dbe3a53dad63669773d3d15c.zip
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
SVN-Revision: 8456
Diffstat (limited to 'package/base-files/files/etc/preinit')
-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 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 -"