]>
git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/install+setup/install/mountsource.sh
2 ###############################################################################
4 # IPFire.org - A linux based firewall #
5 # Copyright (C) 2007 Michael Tremer & Christian Schmidt #
7 # This program is free software: you can redistribute it and/or modify #
8 # it under the terms of the GNU General Public License as published by #
9 # the Free Software Foundation, either version 3 of the License, or #
10 # (at your option) any later version. #
12 # This program is distributed in the hope that it will be useful, #
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15 # GNU General Public License for more details. #
17 # You should have received a copy of the GNU General Public License #
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
20 ###############################################################################
22 echo "Scanning source media"
25 for DEVICE
in $
(kudzu
-qps -t 30 -c CDROM |
grep device
: | cut
-d ' ' -f 2 |
sort |
uniq); do
26 mount
/dev
/${DEVICE} /cdrom
2> /dev
/null
27 if [ -n "$(ls /cdrom/ipfire-*.tlz 2>/dev/null)" ]; then
28 echo -n ${DEVICE} > /tmp
/source_device
29 echo "Found tarball on ${DEVICE}"
32 echo "Found no tarballs on ${DEVICE} - SKIP"
34 umount
/cdrom
2> /dev
/null
37 # scan HD device part1 (usb sticks, etc.)
38 for DEVICE
in $
(kudzu
-qps -t 30 -c HD |
grep device
: | cut
-d ' ' -f 2 |
sort |
uniq); do
39 for DEVICEP
in $
(ls /dev
/${DEVICE}? |
sed "s/\/dev\///");do
40 mount
/dev
/${DEVICEP} /cdrom
2> /dev
/null
41 if [ -n "$(ls /cdrom/ipfire-*.tlz 2>/dev/null)" ]; then
42 echo -n ${DEVICEP} > /tmp
/source_device
43 echo "Found tarball on ${DEVICEP}"
46 echo "Found no tarballs on ${DEVICEP} - SKIP"
48 umount
/cdrom
2> /dev
/null
52 # scan HD device unpart (usb sticks, etc.)
53 for DEVICE
in $
(kudzu
-qps -t 30 -c HD |
grep device
: | cut
-d ' ' -f 2 |
sort |
uniq); do
54 mount
/dev
/${DEVICE} /cdrom
2> /dev
/null
55 if [ -n "$(ls /cdrom/ipfire-*.tlz 2>/dev/null)" ]; then
56 echo -n ${DEVICE} > /tmp
/source_device
57 echo "Found tarball on ${DEVICE}"
60 echo "Found no tarballs on ${DEVICE} - SKIP"
62 umount
/cdrom
2> /dev
/null