]>
git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/install+setup/install/downloadsource.sh
fad2609d59db40a6b9ce03bdcdad5b0f2b415e89
2 ###############################################################################
4 # IPFire.org - A linux based firewall #
5 # Copyright (C) 2010 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 IPFireISO
=download.ipfire.org
/iso
/ipfire.iso
24 #Get user defined download from boot cmdline
25 grep "netinstall=" /proc
/cmdline
> /dev
/null
&& CMDLINE
=1
26 if ( [ "$CMDLINE" == "1" ]); then
27 read CMDLINE
< /proc
/cmdline
28 POS
=${CMDLINE%%netinstall*}
30 IPFireISO
=`echo ${CMDLINE:POS} | cut -d"=" -f2 | cut -d" " -f1`
34 echo "Configure Network with DHCP..."
40 echo "Download with wget..."
41 wget
$IPFireISO -O /tmp
/download.iso
-t3 -U IPFire_NetInstall
/2.x
42 wget
$IPFireISO.md5
-O /tmp
/download.iso.md5
-t3 -U IPFire_NetInstall
/2.x
44 echo "Checking download..."
45 md5_file
=`md5sum /tmp/download.iso | cut -d" " -f1`
46 md5_down
=`cat /tmp/download.iso.md5 | cut -d" " -f1`
47 if [ "$md5_file" == "$md5_down" ]; then
48 mount
/tmp
/download.iso
-o loop
/cdrom
2> /dev
/null
49 if [ -n "$(ls /cdrom/ipfire-*.tlz 2>/dev/null)" ]; then
50 echo -n "null" > /tmp
/source_device
51 echo "Found tarball in /tmp/download.iso"
54 umount
/cdrom
2> /dev
/null