mirror of
https://github.com/hak5/wifipineapple-openwrt.git
synced 2025-10-29 16:57:19 +00:00
Signed-off-by: Imre Kaloz <kaloz@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41630 3c298f89-4303-0410-b956-a3cf2f4a3e73
28 lines
480 B
Plaintext
28 lines
480 B
Plaintext
#
|
|
# 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
|