Pakfire laedt die Listen jetzt besser und hat eine veraenderte Oberflaeche bekommen.
[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
149a26a8
MT
7 mount /dev/${DEVICE} /cdrom 2> /dev/null
8 if [ -n "$(ls /cdrom/ipfire-*.tbz2 2>/dev/null)" ]; then
9 echo -n ${DEVICE} > /tmp/source_device
10 echo "Found tarball on ${DEVICE}"
11 else
12 echo "Found no tarballs on ${DEVICE} - SKIP"
13 fi
14 umount /cdrom 2> /dev/null
72d80898
MT
15done
16
17# scan HD device (usb sticks, etc.)
ee78a5ef 18for DEVICE in $(kudzu -qps -t 30 -c HD | grep device: | cut -d ' ' -f 2 | sort | uniq); do
149a26a8
MT
19 mount /dev/${DEVICE}1 /cdrom 2> /dev/null
20 if [ -n "$(ls /cdrom/ipfire-*.tbz2 2>/dev/null)" ]; then
a3d6c878 21 echo -n ${DEVICE}1 > /tmp/source_device
149a26a8
MT
22 echo "Found tarball on ${DEVICE}"
23 else
24 umount /cdrom 2> /dev/null
25 echo "Found no tarballs on ${DEVICE} - SKIP"
26 fi
27 umount /cdrom 2> /dev/null
72d80898
MT
28done
29
3485f9a2 30if [ -e "/tmp/source_device" ]; then
149a26a8
MT
31 mount /dev/$(cat /tmp/source_device) /cdrom 2> /dev/null
32 exit 0
e3f4dd9c 33else
149a26a8 34 exit 10
e3f4dd9c 35fi