]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame - src/install+setup/install/mountsource.sh
Hddshutdown-Fixes.
[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
ee78a5ef 6for DEVICE in $(kudzu -qps -t 30 -c CDROM | grep device: | cut -d ' ' -f 2 | sort | uniq); do
72d80898 7 mount /dev/${DEVICE} /cdrom 2> /dev/null
ee78a5ef
MT
8 if [ -e /cdrom/ipfire-*.tbz2 ]; then
9 echo -n ${DEVICE} > /tmp/source_device
10 exit 0
72d80898
MT
11 fi
12 umount /cdrom 2> /dev/null
13done
14
15# scan HD device (usb sticks, etc.)
ee78a5ef 16for DEVICE in $(kudzu -qps -t 30 -c HD | grep device: | cut -d ' ' -f 2 | sort | uniq); do
72d80898 17 mount /dev/${DEVICE}1 /cdrom 2> /dev/null
ee78a5ef
MT
18 if [ -e /cdrom/ipfire-*.tbz2 ]; then
19 echo -n ${DEVICE}1 > /tmp/source_device
20 exit 1
72d80898
MT
21 fi
22 umount /cdrom 2> /dev/null
23done
24
25exit 10