From: Michael Tremer Date: Wed, 8 Feb 2012 21:37:09 +0000 (+0100) Subject: installer: Enhance mountsource.sh script. X-Git-Tag: v2.11-core57~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=732447b9b3a188ac4f50b4902efaa854c2fba176;hp=d02a7f9d050e97714e151bb93c8f67448b743d5e;p=ipfire-2.x.git installer: Enhance mountsource.sh script. Searches for installation images on all partitions on external media. References bug #10020. --- diff --git a/src/install+setup/install/mountsource.sh b/src/install+setup/install/mountsource.sh index bb7a7e2fda..6813758778 100644 --- a/src/install+setup/install/mountsource.sh +++ b/src/install+setup/install/mountsource.sh @@ -36,15 +36,17 @@ done # scan HD device part1 (usb sticks, etc.) for DEVICE in $(kudzu -qps -t 30 -c HD | grep device: | cut -d ' ' -f 2 | sort | uniq); do - mount /dev/${DEVICE}1 /cdrom 2> /dev/null + for DEVICEP in $(ls /dev/${DEVICE}? | sed "s/\/dev\///");do + mount /dev/${DEVICEP} /cdrom 2> /dev/null if [ -n "$(ls /cdrom/ipfire-*.tlz 2>/dev/null)" ]; then - echo -n ${DEVICE}1 > /tmp/source_device - echo "Found tarball on ${DEVICE}1" + echo -n ${DEVICEP} > /tmp/source_device + echo "Found tarball on ${DEVICEP}" exit 0 else - echo "Found no tarballs on ${DEVICE}1 - SKIP" + echo "Found no tarballs on ${DEVICEP} - SKIP" fi umount /cdrom 2> /dev/null + done done # scan HD device unpart (usb sticks, etc.)