Neue Mount Skripte fuer den Installer - Status untested

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@793 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
maniacikarus
2007-08-21 08:36:40 +00:00
parent a45de06ef1
commit e3f4dd9c89
2 changed files with 35 additions and 12 deletions

View File

@@ -7,9 +7,9 @@ echo "--> IDE"
for DEVICE in $(kudzu -qps -t 30 -c HD -b IDE | grep device: | cut -d ' ' -f 2 | sort | uniq); do
echo -n "---> $DEVICE"
mount /dev/${DEVICE}1 /harddisk 2> /dev/null
if [ -e /harddisk/ipfire-*.tbz2 ]; then
if [ -n "$(ls /harddisk/ipfire-*.tbz2 2>/dev/null)" ]; then
umount /harddisk 2> /dev/null
echo " is source drive"
echo "${DEVICE} is source drive - skipping"
continue
else
umount /harddisk 2> /dev/null
@@ -19,14 +19,26 @@ for DEVICE in $(kudzu -qps -t 30 -c HD -b IDE | grep device: | cut -d ' ' -f 2 |
fi
done
mount /dev/${DEVICE}1 /cdrom 2> /dev/null
if [ ]; then
echo -n ${DEVICE} > /tmp/source_device
echo "Found Sources in ${DEVICE}"
else
umount /cdrom 2> /dev/null
echo "Found no Sources in ${DEVICE} skipping"
fi
umount /cdrom 2> /dev/null
# scan USB/SCSI devices
echo "--> USB/SCSI"
for DEVICE in $(kudzu -qps -t 30 -c HD -b SCSI | grep device: | cut -d ' ' -f 2 | sort | uniq); do
echo -n "---> $DEVICE"
mount /dev/${DEVICE}1 /harddisk 2> /dev/null
if [ -e /harddisk/ipfire-*.tbz2 ]; then
if [ -n "$(ls /harddisk/ipfire-*.tbz2 2>/dev/null)" ]; then
umount /harddisk 2> /dev/null
echo " is source drive"
echo "${DEVICE} is source drive - skipping"
continue
else
umount /harddisk 2> /dev/null
@@ -41,8 +53,9 @@ echo "--> RAID"
for DEVICE in $(kudzu -qps -t 30 -c HD -b RAID | grep device: | cut -d ' ' -f 2 | sort | uniq); do
echo -n "---> $DEVICE"
mount /dev/${DEVICE}p1 /harddisk 2> /dev/null
if [ -e /harddisk/ipfire-*.tbz2 ]; then
if [ -n "$(ls /harddisk/ipfire-*.tbz2 2>/dev/null)" ]; then
umount /harddisk 2> /dev/null
echo "${DEVICE} is source drive - skipping"
echo " is source drive"
continue
else

View File

@@ -5,9 +5,11 @@ echo "Scanning source media"
# scan CDROM devices
for DEVICE in $(kudzu -qps -t 30 -c CDROM | grep device: | cut -d ' ' -f 2 | sort | uniq); do
mount /dev/${DEVICE} /cdrom 2> /dev/null
if [ -e /cdrom/ipfire-*.tbz2 ]; then
echo -n ${DEVICE} > /tmp/source_device
exit 0
if [ -n "$(ls /cdrom/ipfire-*.tbz2 2>/dev/null)" ]; then
echo -n ${DEVICE} > /tmp/source_device
echo "Found Sources in ${DEVICE}"
else
echo "Found no Sources in ${DEVICE} skipping"
fi
umount /cdrom 2> /dev/null
done
@@ -15,11 +17,19 @@ done
# scan HD device (usb sticks, etc.)
for DEVICE in $(kudzu -qps -t 30 -c HD | grep device: | cut -d ' ' -f 2 | sort | uniq); do
mount /dev/${DEVICE}1 /cdrom 2> /dev/null
if [ -e /cdrom/ipfire-*.tbz2 ]; then
echo -n ${DEVICE}1 > /tmp/source_device
exit 1
if [ -n "$(ls /cdrom/ipfire-*.tbz2 2>/dev/null)" ]; then
echo -n ${DEVICE} > /tmp/source_device
echo "Found Sources in ${DEVICE}"
else
umount /cdrom 2> /dev/null
echo "Found no Sources in ${DEVICE} skipping"
fi
umount /cdrom 2> /dev/null
done
exit 10
if [ -e /tmp/source_device ]; then
mount /dev/$(cat /tmp/source_device) /cdrom 2> /dev/null
exit 0
else
exit 10
fi