]>
git.ipfire.org Git - ipfire-2.x.git/blob - src/install+setup/install/mountdest.sh
3 echo "Scanning for possible destination drives"
7 for DEVICE
in $
(kudzu
-qps -t 30 -c HD
-b IDE |
grep device
: | cut
-d ' ' -f 2 |
sort |
uniq); do
8 mount
/dev
/${DEVICE}1 /harddisk
2> /dev
/null
9 if [ -n "$(ls /harddisk/ipfire-*.tbz2 2>/dev/null)" ]; then
10 umount
/harddisk
2> /dev
/null
11 echo "${DEVICE} is source drive - SKIP"
14 umount
/harddisk
2> /dev
/null
15 echo -n "$DEVICE" > /tmp
/dest_device
16 echo "${DEVICE} - yes, it is our destination"
21 # scan USB/SCSI devices
23 for DEVICE
in $
(kudzu
-qps -t 30 -c HD
-b SCSI |
grep device
: | cut
-d ' ' -f 2 |
sort |
uniq); do
24 mount
/dev
/${DEVICE}1 /harddisk
2> /dev
/null
25 if [ -n "$(ls /harddisk/ipfire-*.tbz2 2>/dev/null)" ]; then
26 umount
/harddisk
2> /dev
/null
27 echo "${DEVICE} is source drive - SKIP"
30 umount
/harddisk
2> /dev
/null
31 echo -n "$DEVICE" > /tmp
/dest_device
32 echo "${DEVICE} - yes, it is our destination"
39 for DEVICE
in $
(kudzu
-qps -t 30 -c HD
-b RAID |
grep device
: | cut
-d ' ' -f 2 |
sort |
uniq); do
40 mount
/dev
/${DEVICE}p1
/harddisk
2> /dev
/null
41 if [ -n "$(ls /harddisk/ipfire-*.tbz2 2>/dev/null)" ]; then
42 umount
/harddisk
2> /dev
/null
43 echo "${DEVICE} is source drive - SKIP"
46 umount
/harddisk
2> /dev
/null
47 echo -n "$DEVICE" > /tmp
/dest_device
48 echo "${DEVICE} - yes, it is our destination"
53 exit 10 # Nothing found