From 263d433619fe22a6643cfd2923dfdaeebf6b0d3e Mon Sep 17 00:00:00 2001 From: Albrecht Lohofener Date: Wed, 6 Nov 2024 12:09:02 +0100 Subject: [PATCH] Fix to avoid that a default configuration overrides a custom configuration during a container update. --- src/install_openwrt_rootfs.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/install_openwrt_rootfs.sh b/src/install_openwrt_rootfs.sh index 8fc2cb8..f8c5c38 100644 --- a/src/install_openwrt_rootfs.sh +++ b/src/install_openwrt_rootfs.sh @@ -26,8 +26,11 @@ else cp /var/vm/openwrt_additional/etc/rc.local /mnt/etc/rc.local chmod +x /mnt/etc/rc.local - chmod +x /var/vm/openwrt_additional/etc/uci-defaults/* - cp /var/vm/openwrt_additional/etc/uci-defaults/* /mnt/etc/uci-defaults/ + # Add some additional default configurations. Only if we have a fresh container + if [ ! -f /storage/old_version ]; then + chmod +x /var/vm/openwrt_additional/etc/uci-defaults/* + cp /var/vm/openwrt_additional/etc/uci-defaults/* /mnt/etc/uci-defaults/ + fi info "Install additional IPKs into the image" mkdir /mnt/var/offline_packages