summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Hainke2026-02-17 23:42:43 +0000
committerRobert Marko2026-03-23 10:31:58 +0000
commit16775c4852c54c061b116ea572525dc5955bd2ae (patch)
tree2ab1eeded361b93a42d6e63e6934105178055cda
parent98f815cab94812da8e448cc4936e49064d1050cd (diff)
base-files: sysupgrade: avoid cat missing conffiles_static
If the user removes all /lib/apk/packages/*.conffiles* files to prevent sysupgrade from preserving configuration, the glob no longer matches and sysupgrade ends up calling cat on a non-existent path: cat: can't open '/lib/apk/packages/*.conffiles_static': No such file or directory Fix this by using find cmd. Signed-off-by: Nick Hainke <vincent@systemli.org> Link: https://github.com/openwrt/openwrt/pull/22071 (cherry picked from commit 10db6fc26e88eb92c864b9e579c3d16c25040a5a) Link: https://github.com/openwrt/openwrt/pull/22566 Signed-off-by: Robert Marko <robimarko@gmail.com>
-rwxr-xr-xpackage/base-files/files/sbin/sysupgrade2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade
index 307ea6ac34..88e154e39e 100755
--- a/package/base-files/files/sbin/sysupgrade
+++ b/package/base-files/files/sbin/sysupgrade
@@ -146,7 +146,7 @@ list_conffiles() {
' /usr/lib/opkg/status
elif [ -d /lib/apk/packages ]; then
conffiles=""
- for file in /lib/apk/packages/*.conffiles_static; do
+ for file in $(find /lib/apk/packages -name "*.conffiles_static" -type f); do
conffiles="$(echo -e "$(cat $file)\n$conffiles")"
done
echo "$conffiles"