From 1e38527a525ca2e4dbe3a53dad63669773d3d15c Mon Sep 17 00:00:00 2001 From: Felix Fietkau 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 SVN-Revision: 8456 --- 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 c11732f..452209f 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.1