mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-06 22:08:54 +00:00
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> Signed-off-by: maurerr <mariusd84@gmail.com>
This commit is contained in:
parent
3855b4b00c
commit
fb4d0c444e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user