# HG changeset patch # User hacker@slitaz # Date 1205341390 0 # Node ID 132de4a8e0af2e5dcc765b20e074278e27ba1fe0 # Parent 9042e1e1a20342ec7f470e3fa4c30bd49a62b47f Minor Bug diff -r 9042e1e1a203 -r 132de4a8e0af tazusb --- a/tazusb Fri Mar 07 17:11:57 2008 +0100 +++ b/tazusb Wed Mar 12 17:03:10 2008 +0000 @@ -58,7 +58,7 @@ # Verify a device exists before format or install check_for_device() { - DEVID=`fdisk -l | grep -w $DEVICE | cut -d: -f1 | cut -d/ -f3` + DEVID=`fdisk -l | grep -m 1 -w $DEVICE | cut -d: -f1 | cut -d/ -f3` if [ -z "$DEVID" ]; then echo -e "\nUnable to find device: $DEVICE\n" exit 0 @@ -109,16 +109,6 @@ # Mount an existing USB device. mount_target_usb() { - # If mount point is in use, unmount - if mount | grep $TARGET_ROOT; then - umount $TARGET_ROOT - fi - - # Device could be mounted elsewhere, so unmount - if mount | grep $PARTID; then - umount $PARTID - fi - echo "Mounting USB target device..." mkdir -p $TARGET_ROOT mount $PARTID $TARGET_ROOT 2>/dev/null