+ echo "Found no tarballs on ${DEVICEP} - SKIP"
+ fi
+ umount /cdrom 2> /dev/null
+ done
+done
+
+# scan all Partitions on raid/mmc devices
+for DEVICE in `find /sys/block/* -maxdepth 0 ! -name fd* ! -name loop* ! -name ram* -exec basename {} \;`
+do
+ for DEVICEP in $(ls /dev/${DEVICE}p? | sed "s/\/dev\///");do
+ mount /dev/${DEVICEP} /cdrom 2> /dev/null
+ if [ -n "$(ls /cdrom/ipfire-*.tlz 2>/dev/null)" ]; then
+ echo -n ${DEVICEP} > /tmp/source_device
+ echo "Found tarball on ${DEVICEP}"
+ exit 0
+ else
+ echo "Found no tarballs on ${DEVICEP} - SKIP"