aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorChuck Fan <fanck0605@qq.com>2021-03-09 17:42:57 +0800
committerPaul Spooren <mail@aparcar.org>2021-06-20 14:19:54 -1000
commitd374e2cdb499b2a4282d84f95709b9a40d88a995 (patch)
tree9170a312d640c5c0a2904cbb3461d9f15bf38fad /package/base-files
parentbffee5ea192386ffeac81e7b40e9d58a93b85db8 (diff)
downloadupstream-d374e2cdb499b2a4282d84f95709b9a40d88a995.tar.gz
upstream-d374e2cdb499b2a4282d84f95709b9a40d88a995.tar.bz2
upstream-d374e2cdb499b2a4282d84f95709b9a40d88a995.zip
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 <fanck0605@qq.com>
Diffstat (limited to 'package/base-files')
-rw-r--r--package/base-files/files/lib/upgrade/common.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh
index b59a404565..b8ae2ecb7e 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() { # <source> [ <command> ]
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