From: Arne Fitzenreiter Date: Fri, 1 May 2009 23:14:16 +0000 (+0200) Subject: Fix usb-fdd source detection X-Git-Tag: v2.5-beta2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=256d83db946144b32bc463645348ff87b7e0648f;p=ipfire-2.x.git Fix usb-fdd source detection --- diff --git a/src/install+setup/install/mountsource.sh b/src/install+setup/install/mountsource.sh index 04a5e44a43..9b71e20b53 100644 --- a/src/install+setup/install/mountsource.sh +++ b/src/install+setup/install/mountsource.sh @@ -33,12 +33,25 @@ for DEVICE in $(kudzu -qps -t 30 -c CDROM | grep device: | cut -d ' ' -f 2 | sor umount /cdrom 2> /dev/null done -# scan HD device (usb sticks, etc.) +# scan HD device unpart (usb sticks, etc.) +for DEVICE in $(kudzu -qps -t 30 -c HD | grep device: | cut -d ' ' -f 2 | sort | uniq); do + mount /dev/${DEVICE} /cdrom 2> /dev/null + if [ -n "$(ls /cdrom/ipfire-*.tbz2 2>/dev/null)" ]; then + echo -n ${DEVICE} > /tmp/source_device + echo "Found tarball on ${DEVICE}" + else + umount /cdrom 2> /dev/null + echo "Found no tarballs on ${DEVICE} - SKIP" + fi + umount /cdrom 2> /dev/null +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 if [ -n "$(ls /cdrom/ipfire-*.tbz2 2>/dev/null)" ]; then echo -n ${DEVICE}1 > /tmp/source_device - echo "Found tarball on ${DEVICE}" + echo "Found tarball on ${DEVICE}1" else umount /cdrom 2> /dev/null echo "Found no tarballs on ${DEVICE} - SKIP"