Add a source check for fdd-image to mountdest.sh

This commit is contained in:
Arne Fitzenreiter
2009-05-22 11:29:45 +02:00
parent 493e5e62d7
commit 4cdac3e52d

View File

@@ -27,7 +27,7 @@ for DEVICE in $(kudzu -qps -t 30 -c HD -b IDE | grep device: | cut -d ' ' -f 2 |
mount /dev/${DEVICE}1 /harddisk 2> /dev/null
if [ -n "$(ls /harddisk/ipfire-*.tbz2 2>/dev/null)" ]; then
umount /harddisk 2> /dev/null
echo "${DEVICE} is source drive - SKIP"
echo "${DEVICE}1 is source drive - SKIP"
continue
else
umount /harddisk 2> /dev/null
@@ -67,11 +67,18 @@ for DEVICE in $(kudzu -qps -t 30 -c HD -b RAID | grep device: | cut -d ' ' -f 2
mount /dev/${DEVICE}p1 /harddisk 2> /dev/null
if [ -n "$(ls /harddisk/ipfire-*.tbz2 2>/dev/null)" ]; then
umount /harddisk 2> /dev/null
echo "${DEVICE} is source drive - SKIP"
echo "${DEVICE}p1 is source drive - SKIP"
continue
else
umount /harddisk 2> /dev/null
mount /dev/${DEVICE}1 /harddisk 2> /dev/null
if [ -n "$(ls /harddisk/ipfire-*.tbz2 2>/dev/null)" ]; then
umount /harddisk 2> /dev/null
echo "${DEVICE}1 is source drive - SKIP"
continue
else
umount /harddisk 2> /dev/null
mount /dev/${DEVICE} /harddisk 2> /dev/null
if [ -n "$(ls /harddisk/ipfire-*.tbz2 2>/dev/null)" ]; then
umount /harddisk 2> /dev/null
echo "${DEVICE} is source drive - SKIP"
@@ -82,6 +89,7 @@ for DEVICE in $(kudzu -qps -t 30 -c HD -b RAID | grep device: | cut -d ' ' -f 2
exit 2
fi
fi
fi
done
exit 10 # Nothing found