Skip to content

Commit

Permalink
build_patches: Remove additional config files preserved during upgrade
Browse files Browse the repository at this point in the history
OpenWrt saves additional config (and other) files included with
list_changed_conffiles in /sbin/sysupgrade.

This is only active since openwrt-18.06, since before that it was
suppressed by missing opkg.

Since we expect to only save what is in sysupgrade.conf, remove
the additional file list (and thus regain pre-openwrt-18.06
behavior).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
  • Loading branch information
adschm committed May 4, 2019
1 parent 40e9f33 commit 9ccaed3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions build_patches/openwrt/0001-sysupgrade-no-config-save.patch
Expand Up @@ -3,18 +3,21 @@ Date: Sat, 8 Jul 2017 10:46:59 +0200
Subject: sysupgrade no config save

diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade
index b75bd097f3..ddcfcd74e4 100755
index b75bd097f3..8ad778fd69 100755
--- a/package/base-files/files/sbin/sysupgrade
+++ b/package/base-files/files/sbin/sysupgrade
@@ -118,7 +118,7 @@ list_changed_conffiles() {
@@ -118,9 +118,9 @@ list_changed_conffiles() {
add_uci_conffiles() {
local file="$1"
( find $(sed -ne '/^[[:space:]]*$/d; /^#/d; p' \
- /etc/sysupgrade.conf /lib/upgrade/keep.d/* 2>/dev/null) \
+ /etc/sysupgrade.conf 2>/dev/null) \
-type f -o -type l 2>/dev/null;
list_changed_conffiles ) | sort -u > "$file"
- list_changed_conffiles ) | sort -u > "$file"
+ ) | sort -u > "$file"
return 0
}

--
2.11.0

0 comments on commit 9ccaed3

Please sign in to comment.