Wir kehren zurueck zu Kudzu, da hwinfo noch mehr Aerger macht.
[people/teissler/ipfire-2.x.git] / src / install+setup / install / mountsource.sh
1 #!/bin/sh
2
3 echo "Scanning source media"
4
5 # scan CDROM devices
6
7 for DEVICE in $(kudzu -qps -t 30 -c CDROM | grep device: | cut -d ' ' -f 2 | sort | uniq); do
8 mount /dev/${DEVICE} /cdrom 2> /dev/null
9 if [ -e /cdrom/boot ]; then
10 echo -n ${DEVICE} > /tmp/source_device
11 exit 0
12 fi
13 umount /cdrom 2> /dev/null
14 done
15
16 # scan HD device (usb sticks, etc.)
17 for DEVICE in $(kudzu -qps -t 30 -c HD | grep device: | cut -d ' ' -f 2 | sort | uniq); do
18 mount /dev/${DEVICE}1 /cdrom 2> /dev/null
19 if [ -e /cdrom/boot ]; then
20 echo -n ${DEVICE}1 > /tmp/source_device
21 exit 1
22 fi
23 umount /cdrom 2> /dev/null
24 done
25
26 exit 10