From d374e2cdb499b2a4282d84f95709b9a40d88a995 Mon Sep 17 00:00:00 2001 From: Chuck Fan Date: Tue, 9 Mar 2021 17:42:57 +0800 Subject: [PATCH] base-files: upgrade: use zcat command provided by busybox Calling `switch_to_ramfs()` will not copy the gzip executable (/bin/gzip) to ramfs, but `/bin/zcat` will call `/bin/gzip` when package gzip is installed, instead of the busybox-supplied zcat. This will cause `zcat` to fail to find `gzip`, then cause the sysupgrade to fail. Adding the `busybox` prefix here will solve the problem. Signed-off-by: Chuck Fan --- package/base-files/files/lib/upgrade/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh index b59a40456551..b8ae2ecb7e5e 100644 --- a/package/base-files/files/lib/upgrade/common.sh +++ b/package/base-files/files/lib/upgrade/common.sh @@ -95,7 +95,7 @@ get_image() { # [ ] if [ -z "$cmd" ]; then local magic="$(dd if="$from" bs=2 count=1 2>/dev/null | hexdump -n 2 -e '1/1 "%02x"')" case "$magic" in - 1f8b) cmd="zcat";; + 1f8b) cmd="busybox zcat";; *) cmd="cat";; esac fi -- 2.30.2