Skip to content

Commit

Permalink
base-files: upgrade: use zcat command provided by busybox
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
fanck0605 authored and aparcar committed Jun 21, 2021
1 parent bffee5e commit d374e2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package/base-files/files/lib/upgrade/common.sh
Expand Up @@ -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
Expand Down

0 comments on commit d374e2c

Please sign in to comment.