tazusb rev 8

Minor Bug
author hacker@slitaz
date Wed Mar 12 17:03:10 2008 +0000 (2008-03-12)
parents 9042e1e1a203
children a43da2aa89b2
files tazusb
line diff
     1.1 --- a/tazusb	Fri Mar 07 17:11:57 2008 +0100
     1.2 +++ b/tazusb	Wed Mar 12 17:03:10 2008 +0000
     1.3 @@ -58,7 +58,7 @@
     1.4  # Verify a device exists before format or install
     1.5  check_for_device()
     1.6  {
     1.7 -	DEVID=`fdisk -l | grep -w $DEVICE | cut -d: -f1 | cut -d/ -f3`
     1.8 +	DEVID=`fdisk -l | grep -m 1 -w $DEVICE | cut -d: -f1 | cut -d/ -f3`
     1.9  	if [ -z "$DEVID" ]; then
    1.10  		echo -e "\nUnable to find device: $DEVICE\n"
    1.11  		exit 0
    1.12 @@ -109,16 +109,6 @@
    1.13  # Mount an existing USB device.
    1.14  mount_target_usb()
    1.15  {
    1.16 -	# If mount point is in use, unmount
    1.17 -	if mount | grep $TARGET_ROOT; then
    1.18 -		umount $TARGET_ROOT
    1.19 -	fi
    1.20 -	
    1.21 -	# Device could be mounted elsewhere, so unmount
    1.22 -	if mount | grep $PARTID; then
    1.23 -		umount $PARTID
    1.24 -	fi
    1.25 -
    1.26  	echo "Mounting USB target device..."	
    1.27  	mkdir -p $TARGET_ROOT
    1.28  	mount $PARTID $TARGET_ROOT 2>/dev/null