[OpenWrt-Devel] [PATCH v4 2/2] Allow sysupgrade restore on ER

Jonathan Thibault jonathan at navigue.com
Tue Dec 4 14:59:32 EST 2018


---
 target/linux/octeon/base-files/lib/preinit/79_move_config | 5 +++++
 target/linux/octeon/base-files/lib/upgrade/platform.sh    | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/target/linux/octeon/base-files/lib/preinit/79_move_config b/target/linux/octeon/base-files/lib/preinit/79_move_config
index ec63d9f5ff..470cbfe005 100644
--- a/target/linux/octeon/base-files/lib/preinit/79_move_config
+++ b/target/linux/octeon/base-files/lib/preinit/79_move_config
@@ -5,6 +5,11 @@ move_config() {
 	. /lib/functions.sh
 
 	case "$(board_name)" in
+		er)
+			mount -t vfat /dev/mmcblk0p1 /mnt
+			[ -f /mnt/sysupgrade.tgz ] && mv -f /mnt/sysupgrade.tgz /
+			umount /mnt
+			;;
 		erlite)
 			mount -t vfat /dev/sda1 /mnt
 			[ -f /mnt/sysupgrade.tgz ] && mv -f /mnt/sysupgrade.tgz /
diff --git a/target/linux/octeon/base-files/lib/upgrade/platform.sh b/target/linux/octeon/base-files/lib/upgrade/platform.sh
index 6d258dbb0f..009eae7a2c 100755
--- a/target/linux/octeon/base-files/lib/upgrade/platform.sh
+++ b/target/linux/octeon/base-files/lib/upgrade/platform.sh
@@ -23,6 +23,11 @@ platform_get_rootfs() {
 
 platform_copy_config() {
 	case "$(board_name)" in
+	er)
+		mount -t vfat /dev/mmcblk0p1 /mnt
+		cp -af "$CONF_TAR" /mnt/
+		umount /mnt
+		;;
 	erlite)
 		mount -t vfat /dev/sda1 /mnt
 		cp -af "$CONF_TAR" /mnt/
-- 
2.12.2


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list