# HG changeset patch # User Christophe Lincoln # Date 1205438994 -3600 # Node ID b0ed320cc6f2293a9f4cc7e3f508d30a959e8049 # Parent be554dd9f92e4685a266877c47b0f24f483fe88f Fix set_bootable + use splash image diff -r be554dd9f92e -r b0ed320cc6f2 tazusb --- a/tazusb Thu Mar 13 16:29:22 2008 +0100 +++ b/tazusb Thu Mar 13 21:09:54 2008 +0100 @@ -59,9 +59,9 @@ # Display a list of available partition. fdisk_list() { - echo "" + echo "----" fdisk -l | grep ^/dev/sd* - echo "" + echo "----" } # We need a USB media to install. @@ -203,9 +203,11 @@ # extlinux.conf / syslinux.cfg cat > $TARGET_ROOT/boot/$ST/$ST.$STE << _EOT_ -display display.txt +display $ST.msg default slitaz -timeout 20 +timeout 40 +implicit 0 +prompt 1 label slitaz kernel /boot/bzImage append initrd=/boot/rootfs.gz rw root=/dev/null home=$UUID @@ -216,27 +218,17 @@ _EOT_ - # display.txt - cat > $TARGET_ROOT/boot/$ST/display.txt << "EOT" - _______. __ __ .___________. ___ ________ - / || | | | | | / \ | / - | (----`| | | | `---| |---` / ^ \ `---/ / - \ \ | | | | | | / /_\ \ / / - .----) | | `----.| | | | / _____ \ / /----. - |_______/ |_______||__| |__| /__/ \__\ /________| - - - SliTaz GNU/Linux LiveUSB - Simple Light Incredible Temporary Autonomus Zone - - -EOT -status + # Splash screen and help files. + cp /media/cdrom/boot/isolinux/isolinux.msg $TARGET_ROOT/boot/$ST/extlinux.msg + sed -i s/'SliTaz GNU/Linux'/'SliTaz GNU/Linux LiveUSB'/ $TARGET_ROOT/boot/$ST/extlinux.msg + cp /media/cdrom/boot/isolinux/splash.lss $TARGET_ROOT/boot/$ST + cp /media/cdrom/boot/isolinux/*.txt $TARGET_ROOT/boot/$ST } # Let user exit or reboot. exit_or_reboot() { + echo "===============================================================================" echo "" echo -n "Do you want to exit Tazusb or reboot system (Exit/reboot) ? " read anser @@ -246,7 +238,6 @@ reboot || reboot -f else umount /media/cdrom - echo "===============================================================================" echo "" exit 0 fi @@ -255,18 +246,19 @@ set_bootable() { # As the boot flag is toggable, need to check it before hand - ISSET=`fdisk -l $DEVICE | grep $DEVICE | grep "*"` + DISK=${DEVICE%[1-99]} + ISSET=`fdisk -l $DISK | grep $DEVICE | grep "\*"` # If not set, set bootable - if [ -z "$ISSET" ]; then - umount $DEVICE - echo "Setting $DEVICE as bootable..." - fdisk $DEVICE >/dev/null << EOF + if [ "$ISSET" == "" ]; then + umount $TARGET_ROOT 2>/dev/null + echo -n "Setting $DEVICE as bootable..." + fdisk $DISK >/dev/null << EOF a 1 w EOF - status + status fi }