tiny-slitaz rev 26

Take care of busybox config
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Sep 07 11:54:26 2019 +0200 (2019-09-07)
parents 293348721e35
children cb1743f12df8
files helper
line diff
     1.1 --- a/helper	Fri Sep 06 11:02:35 2019 +0200
     1.2 +++ b/helper	Sat Sep 07 11:54:26 2019 +0200
     1.3 @@ -33,6 +33,8 @@
     1.4  	</thead>
     1.5  	<tbody>
     1.6  EOT
     1.7 +	unlzma < $TMPDIR/pkgs/linux-[2-9]*/fs.cpio.lzma | \
     1.8 +	( cd $TMPDIR/fs ; cpio -idmu boot/config-busybox )
     1.9  	for i in $TMPDIR/pkgs/*/receipt pkgs/*/receipt; do
    1.10  		[ -s $i ] || continue
    1.11  		case "$i" in
    1.12 @@ -51,11 +53,14 @@
    1.13  		grep -qs "^$PACKAGE " $TMPDIR/uploadconf &&
    1.14  			checked='checked="checked"'
    1.15  		case "$AUTO_SELECTION" in
    1.16 -			never)
    1.17 -				continue;;
    1.18 -			always)
    1.19 -				checked='checked="checked" disabled'
    1.20 -				hidden_var="<input type=\"hidden\" name=\"selected[]\" value=\"$PACKAGE\" />";;
    1.21 +		never)
    1.22 +			continue;;
    1.23 +		always)
    1.24 +			checked='checked="checked" disabled'
    1.25 +			hidden_var="<input type=\"hidden\" name=\"selected[]\" value=\"$PACKAGE\" />";;
    1.26 +		CONF*)
    1.27 +			grep -qs "^$AUTO_SELECTION=y$" $TMPDIR/fs/boot/config-busybox ||
    1.28 +			checked='disabled';;
    1.29  		esac
    1.30  		cat <<EOT
    1.31  		<tr>
    1.32 @@ -272,7 +277,7 @@
    1.33  	. $pkg
    1.34  	grep -qs ^pre_install $pkg && pre_install $2/fs
    1.35  	[ -n "$CONFIG_FILES" ] && for i in $CONFIG_FILES; do echo $i >> $2/config_files; done
    1.36 -	unlzma -c $(dirname $pkg)/fs.cpio.lzma | ( cd $2 ; cpio -idmu )
    1.37 +	unlzma < $(dirname $pkg)/fs.cpio.lzma | ( cd $2 ; cpio -idmu )
    1.38  	exit 
    1.39  }
    1.40  
    1.41 @@ -365,7 +370,7 @@
    1.42  
    1.43  lzma_set_size()
    1.44  {
    1.45 -	n=$(unlzma -c $1 | wc -c)
    1.46 +	n=$(unlzma < $1 | wc -c)
    1.47  	for i in $(seq 1 8); do
    1.48  		printf '\\\\x%02X' $(($n & 255))
    1.49  		n=$(($n >> 8))