From: Arne Fitzenreiter Date: Sat, 2 May 2009 08:09:49 +0000 (+0200) Subject: Fix usb-fdd detection in mountdest.sh X-Git-Tag: v2.5-beta2~4 X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=cf3235ad16f8b35f505b0cc907c42d958f705e0d Fix usb-fdd detection in mountdest.sh --- diff --git a/src/install+setup/install/mountdest.sh b/src/install+setup/install/mountdest.sh index 0d21bbdd6e..6af2b45675 100644 --- a/src/install+setup/install/mountdest.sh +++ b/src/install+setup/install/mountdest.sh @@ -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