]>
git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/install+setup/install/mountsource.sh
2 ###############################################################################
4 # IPFire.org - A linux based firewall #
5 # Copyright (C) 2007-2014 IPFire Team <info@ipfire.org> #
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 #lfs patch source here...
23 version
=FullIPFireVersion
26 echo "Scanning source media"
28 # scan all Block devices
29 for DEVICE
in `find /sys/block/* -maxdepth 0 ! -name fd* ! -name loop* ! -name ram* -exec basename {} \;`
31 mount
/dev
/${DEVICE} /cdrom
2> /dev
/null
32 if [ -n "$(ls /cdrom/${version}.media 2>/dev/null)" ]; then
33 echo -n ${DEVICE} > /tmp
/source_device
34 echo "Found ${version} on ${DEVICE}"
37 echo "not found on ${DEVICE} - SKIP"
39 umount
/cdrom
2> /dev
/null
42 # scan all Partitions on block devices
43 for DEVICE
in `find /sys/block/* -maxdepth 0 ! -name fd* ! -name loop* ! -name ram* -exec basename {} \;`
45 for DEVICEP
in $
(ls /dev
/${DEVICE}?
2>/dev
/null |
sed "s/\/dev\///");do
46 mount
/dev
/${DEVICEP} /cdrom
2> /dev
/null
47 if [ -n "$(ls /cdrom/${version}.media 2>/dev/null)" ]; then
48 echo -n ${DEVICEP} > /tmp
/source_device
49 echo "Found ${version} on ${DEVICEP}"
52 echo "not found on ${DEVICEP} - SKIP"
54 umount
/cdrom
2> /dev
/null
58 # scan all Partitions on raid/mmc devices
59 for DEVICE
in `find /sys/block/* -maxdepth 0 ! -name fd* ! -name loop* ! -name ram* -exec basename {} \;`
61 for DEVICEP
in $
(ls /dev
/${DEVICE}p?
2>/dev
/null |
sed "s/\/dev\///");do
62 mount
/dev
/${DEVICEP} /cdrom
2> /dev
/null
63 if [ -n "$(ls /cdrom/${version}.media 2>/dev/null)" ]; then
64 echo -n ${DEVICEP} > /tmp
/source_device
65 echo "Found ${version} on ${DEVICEP}"
68 echo "not found on ${DEVICEP} - SKIP"
70 umount
/cdrom
2> /dev
/null