diff options
Diffstat (limited to 'package/base-files')
-rw-r--r-- | package/base-files/Makefile | 2 | ||||
-rwxr-xr-x | package/base-files/files/sbin/sysupgrade | 19 |
2 files changed, 13 insertions, 8 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 47d4e73b42..35a07f2aad 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk include $(INCLUDE_DIR)/feeds.mk PKG_NAME:=base-files -PKG_RELEASE:=242 +PKG_RELEASE:=243 PKG_FLAGS:=nonshared PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade index 3300d8e1ea..7977b06ef1 100755 --- a/package/base-files/files/sbin/sysupgrade +++ b/package/base-files/files/sbin/sysupgrade @@ -131,12 +131,19 @@ list_changed_conffiles() { done } +list_static_conffiles() { + local filter=$1 + + find $(sed -ne '/^[[:space:]]*$/d; /^#/d; p' \ + /etc/sysupgrade.conf /lib/upgrade/keep.d/* 2>/dev/null) \ + \( -type f -o -type l \) $filter 2>/dev/null +} + add_conffiles() { local file="$1" - ( find $(sed -ne '/^[[:space:]]*$/d; /^#/d; p' \ - /etc/sysupgrade.conf /lib/upgrade/keep.d/* 2>/dev/null) \ - \( -type f -o -type l \) $find_filter 2>/dev/null; - list_changed_conffiles ) | sort -u > "$file" + + ( list_static_conffiles "$find_filter"; list_changed_conffiles ) | + sort -u > "$file" return 0 } @@ -154,9 +161,7 @@ add_overlayfiles() { # backup files from /etc/sysupgrade.conf and /lib/upgrade/keep.d, but # ignore those aready controlled by opkg conffiles - find $(sed -ne '/^[[:space:]]*$/d; /^#/d; p' \ - /etc/sysupgrade.conf /lib/upgrade/keep.d/* 2>/dev/null) \ - \( -type f -o -type l \) 2>/dev/null | sort -u | + list_static_conffiles | sort -u | grep -h -v -x -F -f $conffiles > "$keepfiles" # backup conffiles, but only those changed if '-u' |