Padlock-Modul aktiviert fuer VIA Epia Boards
[people/teissler/ipfire-2.x.git] / src / install+setup / install / mountsource.sh
CommitLineData
72d80898
MT
1#!/bin/sh
2
72d80898
MT
3echo "Scanning source media"
4
5# scan CDROM devices
6
4809e64e 7for DEVICE in $(hwinfo --cdrom | grep "Device File" | awk -F: '{ print $2 }' | cut -c 7- | sort | uniq); do
72d80898
MT
8 mount /dev/${DEVICE} /cdrom 2> /dev/null
9 if [ -e /cdrom/boot ]; then
0b59f25c 10 echo -n ${DEVICE} > /tmp/source_device
72d80898
MT
11 exit 0
12 fi
13 umount /cdrom 2> /dev/null
14done
15
16# scan HD device (usb sticks, etc.)
4809e64e 17for DEVICE in $(hwinfo --usb --disk | grep "Device File" | awk -F: '{ print $2 }' | cut -c 7- | sort | uniq); do
72d80898
MT
18 mount /dev/${DEVICE}1 /cdrom 2> /dev/null
19 if [ -e /cdrom/boot ]; then
0b59f25c 20 echo -n ${DEVICE}1 > /tmp/source_device
72d80898
MT
21 exit 1
22 fi
23 umount /cdrom 2> /dev/null
24done
25
26exit 10