tazusb diff tazusb @ rev 16
Fix set_bootable + use splash image
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu Mar 13 21:09:54 2008 +0100 (2008-03-13) |
parents | cf3cb5310f4c |
children | 479ea6c5562e |
line diff
1.1 --- a/tazusb Thu Mar 13 16:29:17 2008 +0100 1.2 +++ b/tazusb Thu Mar 13 21:09:54 2008 +0100 1.3 @@ -59,9 +59,9 @@ 1.4 # Display a list of available partition. 1.5 fdisk_list() 1.6 { 1.7 - echo "" 1.8 + echo "----" 1.9 fdisk -l | grep ^/dev/sd* 1.10 - echo "" 1.11 + echo "----" 1.12 } 1.13 1.14 # We need a USB media to install. 1.15 @@ -203,9 +203,11 @@ 1.16 1.17 # extlinux.conf / syslinux.cfg 1.18 cat > $TARGET_ROOT/boot/$ST/$ST.$STE << _EOT_ 1.19 -display display.txt 1.20 +display $ST.msg 1.21 default slitaz 1.22 -timeout 20 1.23 +timeout 40 1.24 +implicit 0 1.25 +prompt 1 1.26 label slitaz 1.27 kernel /boot/bzImage 1.28 append initrd=/boot/rootfs.gz rw root=/dev/null home=$UUID 1.29 @@ -216,27 +218,17 @@ 1.30 1.31 _EOT_ 1.32 1.33 - # display.txt 1.34 - cat > $TARGET_ROOT/boot/$ST/display.txt << "EOT" 1.35 - _______. __ __ .___________. ___ ________ 1.36 - / || | | | | | / \ | / 1.37 - | (----`| | | | `---| |---` / ^ \ `---/ / 1.38 - \ \ | | | | | | / /_\ \ / / 1.39 - .----) | | `----.| | | | / _____ \ / /----. 1.40 - |_______/ |_______||__| |__| /__/ \__\ /________| 1.41 - 1.42 - 1.43 - SliTaz GNU/Linux LiveUSB 1.44 - Simple Light Incredible Temporary Autonomus Zone 1.45 - 1.46 - 1.47 -EOT 1.48 -status 1.49 + # Splash screen and help files. 1.50 + cp /media/cdrom/boot/isolinux/isolinux.msg $TARGET_ROOT/boot/$ST/extlinux.msg 1.51 + sed -i s/'SliTaz GNU/Linux'/'SliTaz GNU/Linux LiveUSB'/ $TARGET_ROOT/boot/$ST/extlinux.msg 1.52 + cp /media/cdrom/boot/isolinux/splash.lss $TARGET_ROOT/boot/$ST 1.53 + cp /media/cdrom/boot/isolinux/*.txt $TARGET_ROOT/boot/$ST 1.54 } 1.55 1.56 # Let user exit or reboot. 1.57 exit_or_reboot() 1.58 { 1.59 + echo "===============================================================================" 1.60 echo "" 1.61 echo -n "Do you want to exit Tazusb or reboot system (Exit/reboot) ? " 1.62 read anser 1.63 @@ -246,7 +238,6 @@ 1.64 reboot || reboot -f 1.65 else 1.66 umount /media/cdrom 1.67 - echo "===============================================================================" 1.68 echo "" 1.69 exit 0 1.70 fi 1.71 @@ -255,18 +246,19 @@ 1.72 set_bootable() 1.73 { 1.74 # As the boot flag is toggable, need to check it before hand 1.75 - ISSET=`fdisk -l $DEVICE | grep $DEVICE | grep "*"` 1.76 + DISK=${DEVICE%[1-99]} 1.77 + ISSET=`fdisk -l $DISK | grep $DEVICE | grep "\*"` 1.78 1.79 # If not set, set bootable 1.80 - if [ -z "$ISSET" ]; then 1.81 - umount $DEVICE 1.82 - echo "Setting $DEVICE as bootable..." 1.83 - fdisk $DEVICE >/dev/null << EOF 1.84 + if [ "$ISSET" == "" ]; then 1.85 + umount $TARGET_ROOT 2>/dev/null 1.86 + echo -n "Setting $DEVICE as bootable..." 1.87 + fdisk $DISK >/dev/null << EOF 1.88 a 1.89 1 1.90 w 1.91 EOF 1.92 - status 1.93 + status 1.94 fi 1.95 } 1.96