mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-11-03 14:34:27 -05: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>
This commit is contained in:
		
							parent
							
								
									bffee5ea19
								
							
						
					
					
						commit
						d374e2cdb4
					
				@ -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