wok rev 24011

mosh: create /usr/share/terminfo/x/xterm-256color link
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Feb 05 17:16:12 2021 +0000 (4 months ago)
parents c58748aa5abf
children a1b12ae1c852
files cookutils/stuff/check-wok mosh/receipt syslinux/stuff/iso2exe/iso2exe.sh syslinux/stuff/iso2exe/taziso zerobin/stuff/purge.sh zerobin/stuff/zerobin.u
line diff
     1.1 --- a/cookutils/stuff/check-wok	Sat Jan 30 17:26:17 2021 +0100
     1.2 +++ b/cookutils/stuff/check-wok	Fri Feb 05 17:16:12 2021 +0000
     1.3 @@ -4,6 +4,10 @@
     1.4  WOK=${1:-/home/slitaz/wok}
     1.5  
     1.6  for i in $WOK/*/receipt ; do
     1.7 +	if [ ! -e $i ]; then
     1.8 +		echo "$WOK is not a wok."
     1.9 +		exit
    1.10 +	fi
    1.11  	pkg=$(basename ${i%/receipt})
    1.12  	echo -en "\r$pkg                  \r" 1>&2
    1.13  	unset PACKAGE WANTED SHORT_DESC DEPENDS BUILD_DEPENDS SUGGESTED
     2.1 --- a/mosh/receipt	Sat Jan 30 17:26:17 2021 +0100
     2.2 +++ b/mosh/receipt	Fri Feb 05 17:16:12 2021 +0000
     2.3 @@ -70,5 +70,8 @@
     2.4  		sed -i 's/^DROPBEAR_OPTIONS="/&-a /' "$1/etc/daemons.conf" &&
     2.5  		[ -z "$1" ] && /etc/init.d/dropbear restart
     2.6  	fi
     2.7 +	[ ! -e $1/usr/share/terminfo/x/xterm-256color ] &&
     2.8 +		[ -e $1/usr/share/terminfo/x/xterm-color ] &&
     2.9 +		ln -s xterm-color $1/usr/share/terminfo/x/xterm-256color
    2.10  	true
    2.11  }
     3.1 --- a/syslinux/stuff/iso2exe/iso2exe.sh	Sat Jan 30 17:26:17 2021 +0100
     3.2 +++ b/syslinux/stuff/iso2exe/iso2exe.sh	Fri Feb 05 17:16:12 2021 +0000
     3.3 @@ -41,13 +41,17 @@
     3.4  add_rootfs()
     3.5  {
     3.6  	TMP=/tmp/iso2exe$$
     3.7 -	mkdir -p $TMP
     3.8 -	$0 --get rootfs.gz > $TMP/rootfs.gz
     3.9 -	SIZE=$(wc -c < $TMP/rootfs.gz)
    3.10 -	store 24 $SIZE $1
    3.11 -	OFS=$(( 0x7FF0 - $SIZE ))
    3.12 -	printf "Adding rootfs.gz file at %04X (%d bytes) ...\n" $OFS $SIZE
    3.13 -	ddn if=$TMP/rootfs.gz of=$1 bs=1 seek=$OFS
    3.14 +	mkdir -p $TMP/mnt
    3.15 +	mount -o loop,ro $1 $TMP/mnt
    3.16 +	if grep -qs rootfs $TMP/mnt/boot/isolinux/isolinux.cfg ; then
    3.17 +		$0 --get rootfs.gz > $TMP/rootfs.gz
    3.18 +		SIZE=$(wc -c < $TMP/rootfs.gz)
    3.19 +		store 24 $SIZE $1
    3.20 +		OFS=$(( 0x7FF0 - $SIZE ))
    3.21 +		printf "Adding rootfs.gz file at %04X (%d bytes) ...\n" $OFS $SIZE
    3.22 +		ddn if=$TMP/rootfs.gz of=$1 bs=1 seek=$OFS
    3.23 +	fi
    3.24 +	umount $TMP/mnt
    3.25  	rm -rf $TMP
    3.26  }
    3.27  
    3.28 @@ -109,8 +113,11 @@
    3.29  		store $(($i-2)) $(stat -c %s /tmp/mnt$$/boot/linld.com) $1
    3.30  		r="$(sed '/rootfs[0-9]/!d;s|.* initrd=||;s|/boot/||g;s| .*||' \
    3.31  			/tmp/mnt$$/boot/isolinux/isolinux.cfg | tail -n1)"
    3.32 -		echo -n "image=/boot/bzImage initrd=${r:-rootfs.gz},! autologin rdinit=/init.exe" | \
    3.33 -		ddn bs=1 of=$1 conv=notrunc seek=$(($i-134))
    3.34 +		if grep -qs rootfs /tmp/mnt$$/boot/isolinux/isolinux.cfg ; then
    3.35 +			echo -n "image=/boot/bzImage initrd=${r:-rootfs.gz},! autologin rdinit=/init.exe"
    3.36 +		else
    3.37 +			echo -n "$(sed '/KERNEL/!d;s|.*KERNEL *|image=|;q' /tmp/mnt$$/boot/isolinux/isolinux.cfg)"
    3.38 +		fi | ddn bs=1 of=$1 conv=notrunc seek=$(($i-134))
    3.39  	fi
    3.40  	umount /tmp/mnt$$	
    3.41  	rmdir /tmp/mnt$$	
     4.1 --- a/syslinux/stuff/iso2exe/taziso	Sat Jan 30 17:26:17 2021 +0100
     4.2 +++ b/syslinux/stuff/iso2exe/taziso	Fri Feb 05 17:16:12 2021 +0000
     4.3 @@ -289,7 +289,7 @@
     4.4  	fi
     4.5  	echo -en "\nInstall boot files..."
     4.6  	for i in $media/boot/bzImage* $media/boot/*pxe* \
     4.7 -		$media/boot/plop.exe \
     4.8 +		$media/boot/plop* \
     4.9  		$media/boot/isolinux/he* $media/boot/isolinux/opt* \
    4.10  		$media/README $media/boot/memtest* ; do
    4.11  		[ -s $i ] && cp $i $mnt/slitaz/boot
    4.12 @@ -843,7 +843,7 @@
    4.13  
    4.14  plop()
    4.15  {
    4.16 -	gotcdfile 'plop.exe'
    4.17 +	gotcdfile 'plop*'
    4.18  	if [ -z "$1" ]; then
    4.19  		$DIALOG --clear --title " Create $(basename $file .exe).exe ? " \
    4.20  			--yes-label "Install" --yesno \
    4.21 @@ -863,7 +863,7 @@
    4.22  Please insert a blank disk in floppy drive.\n" 0 0
    4.23  		[ $? -eq 0 ] || return
    4.24  	fi
    4.25 -	gotcdfile 'plop.exe' && mkfloppy $file
    4.26 +	gotcdfile 'plop*' && mkfloppy $file
    4.27  }
    4.28  
    4.29  menuitem()
    4.30 @@ -1666,8 +1666,8 @@
    4.31  $(cdfilef 'memtest*'	"fdmemtest"	"Create a Memtest86 boot floppy") \
    4.32  $(cdexe '?pxe*'		"pxe"		"Get SliTaz Web boot DOS/EXE utility") \
    4.33  $(cdfilef '?pxe*'	"fdpxe"		"Create a SliTaz Web boot floppy") \
    4.34 -$(cdexe 'plop.exe'	"plop"		"Get USB boot DOS/EXE utility") \
    4.35 -$(cdfilef 'plop.exe'	"fdplop"	"Create a USB boot floppy") \
    4.36 +$(cdexe 'plop*'		"plop"		"Get USB boot DOS/EXE utility") \
    4.37 +$(cdfilef 'plop*'	"fdplop"	"Create a USB boot floppy") \
    4.38  $(initxfile reboot	"restart"	"Restart the computer") \
    4.39  $(initxfile poweroff	"stop"		"Power off") \
    4.40  $(initx			"bootlog"       "Linux boot messages") \
     5.1 --- a/zerobin/stuff/purge.sh	Sat Jan 30 17:26:17 2021 +0100
     5.2 +++ b/zerobin/stuff/purge.sh	Fri Feb 05 17:16:12 2021 +0000
     5.3 @@ -9,7 +9,7 @@
     5.4  			[ $(sed 's/.*"expire_date":\([0-9]*\).*/\1/' $k) -lt \
     5.5  			  $(date +%s) ] && rm -rf $k*
     5.6  		done
     5.7 -		rmdir $j 2> /dev/null
     5.8 +		rmdir $j
     5.9  	done
    5.10 -	rmdir $i 2> /dev/null
    5.11 -done
    5.12 +	rmdir $i
    5.13 +done 2>/dev/null
     6.1 --- a/zerobin/stuff/zerobin.u	Sat Jan 30 17:26:17 2021 +0100
     6.2 +++ b/zerobin/stuff/zerobin.u	Fri Feb 05 17:16:12 2021 +0000
     6.3 @@ -6,8 +6,8 @@
     6.4   
     6.5  +function remote_address()
     6.6  +{
     6.7 -+	// if (isset($_SERVER["HTTP_X_FORWARDED_FOR"]))
     6.8 -+	//	return $_SERVER["HTTP_X_FORWARDED_FOR"];
     6.9 ++	if (isset($_SERVER["HTTP_X_FORWARDED_FOR"]))
    6.10 ++		return $_SERVER["HTTP_X_FORWARDED_FOR"];
    6.11  +	return $_SERVER["REMOTE_ADDR"];
    6.12  +}
    6.13  +