diff options
author | Imre Kaloz <kaloz@openwrt.org> | 2014-07-13 22:12:56 +0000 |
---|---|---|
committer | Imre Kaloz <kaloz@openwrt.org> | 2014-07-13 22:12:56 +0000 |
commit | 25d2e3230f90de785a7bfd8fa5c0ed954cbf328d (patch) | |
tree | 500536d1ff4c54452c919305d24fa35fd0e430c4 /target/linux/mvebu/base-files/lib/preinit | |
parent | b80600b6631c55000a3dbf6ab2bae0d97da324f3 (diff) | |
download | upstream-25d2e3230f90de785a7bfd8fa5c0ed954cbf328d.tar.gz upstream-25d2e3230f90de785a7bfd8fa5c0ed954cbf328d.tar.bz2 upstream-25d2e3230f90de785a7bfd8fa5c0ed954cbf328d.zip |
[mvebu]: add sysupgrade support
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41630 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/mvebu/base-files/lib/preinit')
-rw-r--r-- | target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg b/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg new file mode 100644 index 0000000000..54aff7dbcc --- /dev/null +++ b/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg @@ -0,0 +1,27 @@ +# +# Copyright (C) 2014 OpenWrt.org +# + +preinit_mount_syscfg() { + + . /lib/functions.sh + . /lib/mvebu.sh + + case $(mvebu_board_name) in + armada-xp-mamba) + mkdir /tmp/syscfg + ubiattach -p /dev/mtd8 + mount -t ubifs ubi1:syscfg /tmp/syscfg + [ -f /tmp/syscfg/sysupgrade.tgz ] && { + echo "- config restore -" + cd / + mv /tmp/syscfg/sysupgrade.tgz /tmp + tar xzf /tmp/sysupgrade.tgz + rm -f /tmp/sysupgrade.tgz + sync + } + ;; + esac +} + +boot_hook_add preinit_main preinit_mount_syscfg |