[openwrt/openwrt] base-files: ignore initscript output in sysupgrade

LEDE Commits lede-commits at lists.infradead.org
Sun Jun 22 11:45:25 PDT 2025


dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/07dfb9b710a91d544f4e0011118a30fff5eb0d82

commit 07dfb9b710a91d544f4e0011118a30fff5eb0d82
Author: Niall McGee <niall.mcgee at bt.com>
AuthorDate: Fri May 30 22:55:35 2025 +0100

    base-files: ignore initscript output in sysupgrade
    
    Suppress output from `/etc/init.d/service enabled` to avoid corrupting
    of the sysupgrade tarball.
    
    Fixes: 0ad062a21b ("base-files: sysupgrade: add uci-defaults script disabling services #2")
    Signed-off-by: Niall McGee <niall.mcgee at bt.com>
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/base-files/files/sbin/sysupgrade | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade
index 7d4823246e..307ea6ac34 100755
--- a/package/base-files/files/sbin/sysupgrade
+++ b/package/base-files/files/sbin/sysupgrade
@@ -273,7 +273,7 @@ create_backup_archive() {
 
 		if [ $ret -eq 0 ]; then
 			for service in /etc/init.d/*; do
-				if ! $service enabled; then
+				if ! $service enabled >/dev/null 2>&1; then
 				disabled="$disabled$service disable\n"
 				fi
 			done




More information about the lede-commits mailing list