slitaz-tools rev 221
bootfloppybox: fix grub menu
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Jun 25 15:16:41 2008 +0000 (2008-06-25) |
parents | 3de8bd028ff4 |
children | 235d972c2110 |
files | tinyutils/bootfloppybox |
line diff
1.1 --- a/tinyutils/bootfloppybox Wed Jun 25 10:05:29 2008 +0000 1.2 +++ b/tinyutils/bootfloppybox Wed Jun 25 15:16:41 2008 +0000 1.3 @@ -50,6 +50,8 @@ 1.4 fi 1.5 } 1.6 1.7 +while true; do 1.8 + 1.9 if [ "$1" == "call" ]; then 1.10 case "$2" in 1.11 setup-grub) 1.12 @@ -61,13 +63,16 @@ 1.13 cp /usr/lib/grub/i386-pc/stage? /media/floppy/boot/grub 1.14 cp /tmp/floppybox.grub.menu /media/floppy/boot/grub/menu.lst 1.15 [ -f /usr/share/boot/btmgr -a -f /usr/share/boot/memdisk.lzma ]\ 1.16 - && cp /usr/share/boot/btmgr /media/floppy/boot \ 1.17 + && cat /usr/share/boot/btmgr /dev/zero | \ 1.18 + dd bs=18k count=80 | gzip -9 > \ 1.19 + /media/floppy/boot/btmgr.gz \ 1.20 && unlzma -c /usr/share/boot/memdisk.lzma > \ 1.21 /media/floppy/boot/memdisk 1.22 [ -f /usr/share/boot/plop.gz -a \ 1.23 -f /usr/share/boot/memdisk.lzma ]\ 1.24 - && zcat /usr/share/boot/plop.gz > \ 1.25 - /media/floppy/boot/plop \ 1.26 + && zcat /usr/share/boot/plop.gz | cat - /dev/zero | \ 1.27 + dd bs=18k count=80 | gzip -9 > \ 1.28 + /media/floppy/boot/plop.gz \ 1.29 && unlzma -c /usr/share/boot/memdisk.lzma > \ 1.30 /media/floppy/boot/memdisk 1.31 [ -f /usr/share/boot/etherboot ]\ 1.32 @@ -140,15 +145,15 @@ 1.33 [ -f /usr/share/boot/btmgr -a -f /usr/share/boot/memdisk.lzma ]\ 1.34 && cat >> /tmp/floppybox.grub.menu <<EOT 1.35 title Smart Boot Manager (boot floppy, hard disk or CD/DVD) 1.36 - kernel /boot/memtest 1.37 - initrd /boot/btmgr 1.38 + kernel /boot/memdisk floppy c=80 h=2 s=18 1.39 + initrd /boot/btmgr.gz 1.40 1.41 EOT 1.42 [ -f /usr/share/boot/plop.gz -a -f /usr/share/boot/memdisk.lzma ]\ 1.43 && cat >> /tmp/floppybox.grub.menu <<EOT 1.44 title Plop Boot Manager (boot floppy, hard disk, CD/DVD or USB) 1.45 - kernel /boot/memtest 1.46 - initrd /boot/plop 1.47 + kernel /boot/memdisk floppy c=80 h=2 s=18 1.48 + initrd /boot/plop.gz 1.49 1.50 EOT 1.51 [ -f /usr/share/boot/etherboot ] && cat >> /tmp/floppybox.grub.menu <<EOT 1.52 @@ -330,7 +335,7 @@ 1.53 <input file icon=\"go-jump\"></input> 1.54 <label>Install</label> 1.55 <action>$tmp2</action> 1.56 - <action type=\"exit\">Exit</action> 1.57 + <action type=\"exit\">restart</action> 1.58 </button> 1.59 </hbox> 1.60 </frame> 1.61 @@ -362,7 +367,7 @@ 1.62 1.63 # Only root can create floppy. 1.64 check_root 1.65 -gtkdialog --program=BOOT_DIALOG 1.66 +gtkdialog --program=BOOT_DIALOG | grep -q 'EXIT="restart"' && continue 1.67 rm -f /tmp/floppybox.grub.menu 1.68 - 1.69 exit 0 1.70 +done