wok rev 17931

syslinux/taziso: show flavor extra infos
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Apr 12 14:55:37 2015 +0200 (2015-04-12)
parents 4c62635505df
children aece1721c14f
files syslinux/stuff/iso2exe/init syslinux/stuff/iso2exe/taziso
line diff
     1.1 --- a/syslinux/stuff/iso2exe/init	Sun Apr 12 12:35:21 2015 +0200
     1.2 +++ b/syslinux/stuff/iso2exe/init	Sun Apr 12 14:55:37 2015 +0200
     1.3 @@ -902,6 +902,34 @@
     1.4  	gotcdfile "?pxe" && dokexec
     1.5  }
     1.6  
     1.7 +flavdata()
     1.8 +{
     1.9 +	dd if=/mnt/$ISO bs=512 skip=$((1+$(get 417 /mnt/$ISO 1))) \
    1.10 +		count=20 2>/dev/null | zcat 2>/dev/null
    1.11 +}
    1.12 +
    1.13 +hasflavinfo()
    1.14 +{
    1.15 +	[ "$(flavdata | dd bs=1 count=8 2> /dev/null | strings)" == \
    1.16 +	  "07070100" ] && echo -en "\"$2\"	\"$3\""
    1.17 +}
    1.18 +
    1.19 +showfavinfo()
    1.20 +{
    1.21 +	mkdir -p /tmp/data
    1.22 +	flavdata | ( cd /tmp/data ; cpio -i )
    1.23 +	file=/tmp/data/info
    1.24 +	cat /tmp/data/*desc > $file
    1.25 +	for i in /tmp/data/*list* ; do
    1.26 +		echo "=== extra ${i#*list} files"
    1.27 +		cat $i
    1.28 +	done >> $file
    1.29 +	$DIALOG --clear \
    1.30 +		--title " Flavor infos " \
    1.31 +		--textbox $file 24 78
    1.32 +	rm -rf /tmp/data
    1.33 +}
    1.34 +
    1.35  shell()
    1.36  {
    1.37  	trap text 2 
    1.38 @@ -943,6 +971,7 @@
    1.39  $(gotposixovl		"installtaz"	"Hard disk installation (TAZUSB way)") \
    1.40  $(xfile tazusb		"usbkey"	"USB key read/write installation") \
    1.41  $(ishybrid		"usbbootkey"	"USB boot key (read only)") \
    1.42 +$(hasflavinfo		"showfavinfo"	"Show flavor extra infos") \
    1.43  $(fddata		"fdbootstrap"	"Create a floppy bootstrap") \
    1.44  			"tazboot"	"Get tazboot.exe Linux loader" \
    1.45  $(cdexe boot/bzImage	"bzimage"	"Get linux DOS/EXE file") \
     2.1 --- a/syslinux/stuff/iso2exe/taziso	Sun Apr 12 12:35:21 2015 +0200
     2.2 +++ b/syslinux/stuff/iso2exe/taziso	Sun Apr 12 14:55:37 2015 +0200
     2.3 @@ -978,6 +978,38 @@
     2.4  	gotcdfile '?pxe' && dokexec
     2.5  }
     2.6  
     2.7 +flavdata()
     2.8 +{
     2.9 +	dd if=$ISO bs=512 skip=$((1+$(get 417 $ISO 1))) count=20 2>/dev/null | \
    2.10 +	zcat 2>/dev/null
    2.11 +}
    2.12 +
    2.13 +hasflavinfo()
    2.14 +{
    2.15 +	[ "$(flavdata | dd bs=1 count=8 2> /dev/null | strings)" == \
    2.16 +	  "07070100" ] && menuitem "$@"
    2.17 +}
    2.18 +
    2.19 +showfavinfo()
    2.20 +{
    2.21 +	mkdir -p /tmp/data
    2.22 +	flavdata | ( cd /tmp/data ; cpio -i )
    2.23 +	file=/tmp/data/info
    2.24 +	cat /tmp/data/*desc > $file
    2.25 +	for i in /tmp/data/*list* ; do
    2.26 +		echo "=== extra ${i#*list} files"
    2.27 +		cat $i
    2.28 +	done >> $file
    2.29 +	if [ "$1" ]; then
    2.30 +		cat $file
    2.31 +	else
    2.32 +		$DIALOG --clear \
    2.33 +			--title " Flavor infos " \
    2.34 +			--textbox $file 24 78
    2.35 +	fi
    2.36 +	rm -rf /tmp/data
    2.37 +}
    2.38 +
    2.39  quit()
    2.40  {
    2.41  	umount -d /media/cdrom
    2.42 @@ -1022,6 +1054,7 @@
    2.43  $(gotposixovlzip	"insttaz2zip"	"ZIP installation archive (TAZUSB way)") \
    2.44  $(xfile tazusb		"usbkey"	"USB key read/write installation") \
    2.45  $(ishybrid		"usbbootkey"	"USB boot key (read only)") \
    2.46 +$(hasflavinfo		"showfavinfo"	"Show flavor extra infos") \
    2.47  $(menuitem		"tazboot"	"Get tazboot.exe Linux loader") \
    2.48  $(cdexe boot/bzImage	"bzimage"	"Get linux DOS/EXE file") \
    2.49  $(cdexe 'memtest*'	"memtest"	"Get Memtest86 DOS/EXE file") \