tazusb rev 11
Fix mbr install and check for cdrom before
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Mar 12 23:24:19 2008 +0100 (2008-03-12) |
parents | 302a38794977 |
children | 1a64f0e814c0 |
files | tazusb |
line diff
1.1 --- a/tazusb Wed Mar 12 22:14:18 2008 +0000 1.2 +++ b/tazusb Wed Mar 12 23:24:19 2008 +0100 1.3 @@ -63,7 +63,7 @@ 1.4 echo -e "\nUnable to find device: $DEVICE\n" 1.5 exit 0 1.6 fi 1.7 - DEVID=${DEVID%?} 1.8 + DEVID=${DEVICE%?} 1.9 } 1.10 1.11 #gets the UUID and filesystem type 1.12 @@ -144,9 +144,10 @@ 1.13 install_mbr() 1.14 { 1.15 # MBR 1.16 + DISK=${DEVICE%[1-99]} 1.17 if [ -f /usr/share/syslinux/mbr.bin ]; then 1.18 - echo -n "Installing a new MBR to: $DEVICE" 1.19 - cat /usr/share/syslinux/mbr.bin > $DEVID 1.20 + echo -n "Installing a new MBR to: $DISK" 1.21 + cat /usr/share/syslinux/mbr.bin > $DISK 1.22 status 1.23 else 1.24 # Skip MBR install (tazpkg get-install syslinux-extra ? and then cat) 1.25 @@ -361,12 +362,12 @@ 1.26 fi 1.27 1.28 check_for_device 1.29 + mount_cdrom 1.30 get_part_info 1.31 unmount_target_usb 1.32 install_mbr 1.33 set_bootable 1.34 mount_target_usb 1.35 - mount_cdrom 1.36 copy_cdrom_files 1.37 install_boot 1.38 exit_or_reboot