[OpenWrt-Devel] [PATCH] imx6: apalis: fix config survival after sysupgrade -n
Petr Štetiar
ynezz at true.cz
Mon May 13 11:28:24 EDT 2019
This patch fixes `sysupgrade -n` when flashed with rootfs of the same
size as currently running, so the rootfs_data wouldn't get destroyed and
thus survive reboot. So let's fix it by always cleaning up the content
of the rootfs_data during sysupgrade.
Signed-off-by: Petr Štetiar <ynezz at true.cz>
---
target/linux/imx6/base-files/lib/upgrade/platform.sh | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/target/linux/imx6/base-files/lib/upgrade/platform.sh b/target/linux/imx6/base-files/lib/upgrade/platform.sh
index 2d76b6b4af33..fe3bf2184fc7 100755
--- a/target/linux/imx6/base-files/lib/upgrade/platform.sh
+++ b/target/linux/imx6/base-files/lib/upgrade/platform.sh
@@ -72,3 +72,13 @@ platform_copy_config() {
;;
esac
}
+
+platform_pre_upgrade() {
+ local board=$(board_name)
+
+ case "$board" in
+ apalis*)
+ [ "$SAVE_CONFIG" -eq 0 ] && jffs2reset -y
+ ;;
+ esac
+}
--
1.9.1
_______________________________________________
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