]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Fix usb-fdd detection in mountdest.sh
authorArne Fitzenreiter <arne_f@ipfire.org>
Sat, 2 May 2009 08:09:49 +0000 (10:09 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sat, 2 May 2009 08:09:49 +0000 (10:09 +0200)
src/install+setup/install/mountdest.sh

index 0d21bbdd6e792b451c84253007c8bbd7ad41ee55..6af2b4567501e64296c4ecbdb61176eeb7fc9953 100644 (file)
@@ -40,16 +40,24 @@ done
 # scan USB/SCSI devices
 echo "--> USB/SCSI"
 for DEVICE in $(kudzu -qps -t 30 -c HD -b SCSI | grep device: | cut -d ' ' -f 2 | sort | uniq); do
-               mount /dev/${DEVICE}1 /harddisk 2> /dev/null
+               mount /dev/${DEVICE} /harddisk 2> /dev/null
                if [ -n "$(ls /harddisk/ipfire-*.tbz2 2>/dev/null)" ]; then
                        umount /harddisk 2> /dev/null
                        echo "${DEVICE} is source drive - SKIP"
                        continue
                else
                        umount /harddisk 2> /dev/null
-                       echo -n "$DEVICE" > /tmp/dest_device
-                       echo "${DEVICE} - yes, it is our destination"
-                       exit 1
+                       mount /dev/${DEVICE}1 /harddisk 2> /dev/null
+                       if [ -n "$(ls /harddisk/ipfire-*.tbz2 2>/dev/null)" ]; then
+                               umount /harddisk 2> /dev/null
+                               echo "${DEVICE}1 is source drive - SKIP"
+                               continue
+                       else
+                               umount /harddisk 2> /dev/null
+                               echo -n "$DEVICE" > /tmp/dest_device
+                               echo "${DEVICE} - yes, it is our destination"
+                               exit 1
+                       fi
                fi
 done