]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
installer: Enhance mountsource.sh script.
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 8 Feb 2012 21:37:09 +0000 (22:37 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 8 Feb 2012 21:38:29 +0000 (22:38 +0100)
Searches for installation images on all partitions on external
media.

References bug #10020.

src/install+setup/install/mountsource.sh

index bb7a7e2fda2c798f694dc749d7e10fba87ac7b4c..6813758778da4ff93b586ba43c8e3a8e7dede357 100644 (file)
@@ -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.)