# HG changeset patch # User Pascal Bellard # Date 1428843337 -7200 # Node ID a12fb1874d30a9a8a1d1b1f414b0539677b6216b # Parent 4c62635505dfaa69119e609c1192a2c117b82af2 syslinux/taziso: show flavor extra infos diff -r 4c62635505df -r a12fb1874d30 syslinux/stuff/iso2exe/init --- a/syslinux/stuff/iso2exe/init Sun Apr 12 12:35:21 2015 +0200 +++ b/syslinux/stuff/iso2exe/init Sun Apr 12 14:55:37 2015 +0200 @@ -902,6 +902,34 @@ gotcdfile "?pxe" && dokexec } +flavdata() +{ + dd if=/mnt/$ISO bs=512 skip=$((1+$(get 417 /mnt/$ISO 1))) \ + count=20 2>/dev/null | zcat 2>/dev/null +} + +hasflavinfo() +{ + [ "$(flavdata | dd bs=1 count=8 2> /dev/null | strings)" == \ + "07070100" ] && echo -en "\"$2\" \"$3\"" +} + +showfavinfo() +{ + mkdir -p /tmp/data + flavdata | ( cd /tmp/data ; cpio -i ) + file=/tmp/data/info + cat /tmp/data/*desc > $file + for i in /tmp/data/*list* ; do + echo "=== extra ${i#*list} files" + cat $i + done >> $file + $DIALOG --clear \ + --title " Flavor infos " \ + --textbox $file 24 78 + rm -rf /tmp/data +} + shell() { trap text 2 @@ -943,6 +971,7 @@ $(gotposixovl "installtaz" "Hard disk installation (TAZUSB way)") \ $(xfile tazusb "usbkey" "USB key read/write installation") \ $(ishybrid "usbbootkey" "USB boot key (read only)") \ +$(hasflavinfo "showfavinfo" "Show flavor extra infos") \ $(fddata "fdbootstrap" "Create a floppy bootstrap") \ "tazboot" "Get tazboot.exe Linux loader" \ $(cdexe boot/bzImage "bzimage" "Get linux DOS/EXE file") \ diff -r 4c62635505df -r a12fb1874d30 syslinux/stuff/iso2exe/taziso --- a/syslinux/stuff/iso2exe/taziso Sun Apr 12 12:35:21 2015 +0200 +++ b/syslinux/stuff/iso2exe/taziso Sun Apr 12 14:55:37 2015 +0200 @@ -978,6 +978,38 @@ gotcdfile '?pxe' && dokexec } +flavdata() +{ + dd if=$ISO bs=512 skip=$((1+$(get 417 $ISO 1))) count=20 2>/dev/null | \ + zcat 2>/dev/null +} + +hasflavinfo() +{ + [ "$(flavdata | dd bs=1 count=8 2> /dev/null | strings)" == \ + "07070100" ] && menuitem "$@" +} + +showfavinfo() +{ + mkdir -p /tmp/data + flavdata | ( cd /tmp/data ; cpio -i ) + file=/tmp/data/info + cat /tmp/data/*desc > $file + for i in /tmp/data/*list* ; do + echo "=== extra ${i#*list} files" + cat $i + done >> $file + if [ "$1" ]; then + cat $file + else + $DIALOG --clear \ + --title " Flavor infos " \ + --textbox $file 24 78 + fi + rm -rf /tmp/data +} + quit() { umount -d /media/cdrom @@ -1022,6 +1054,7 @@ $(gotposixovlzip "insttaz2zip" "ZIP installation archive (TAZUSB way)") \ $(xfile tazusb "usbkey" "USB key read/write installation") \ $(ishybrid "usbbootkey" "USB boot key (read only)") \ +$(hasflavinfo "showfavinfo" "Show flavor extra infos") \ $(menuitem "tazboot" "Get tazboot.exe Linux loader") \ $(cdexe boot/bzImage "bzimage" "Get linux DOS/EXE file") \ $(cdexe 'memtest*' "memtest" "Get Memtest86 DOS/EXE file") \