]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/installer/downloadsource.sh
Merge branch 'kernel-test' into seventeen
[people/pmueller/ipfire-2.x.git] / src / installer / downloadsource.sh
CommitLineData
0f680bcc
AF
1#!/bin/sh
2###############################################################################
3# #
4# IPFire.org - A linux based firewall #
5# Copyright (C) 2010 IPFire Team <info@ipfire.org> #
6# #
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. #
11# #
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. #
16# #
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/>. #
19# #
20###############################################################################
21
d4503cde
AF
22#lfs change the url while build!
23IPFireISO=ipfire.iso
24#
0f680bcc
AF
25
26#Get user defined download from boot cmdline
27grep "netinstall=" /proc/cmdline > /dev/null && CMDLINE=1
28if ( [ "$CMDLINE" == "1" ]); then
29 read CMDLINE < /proc/cmdline
30 POS=${CMDLINE%%netinstall*}
31 POS=${#POS}
32 IPFireISO=`echo ${CMDLINE:POS} | cut -d"=" -f2 | cut -d" " -f1`
33fi
34
0f680bcc
AF
35echo "Download with wget..."
36wget $IPFireISO -O /tmp/download.iso -t3 -U IPFire_NetInstall/2.x
0329efd2 37wget $IPFireISO.md5 -O /tmp/download.iso.md5 -t3 -U IPFire_NetInstall/2.x
0f680bcc
AF
38echo
39echo "Checking download..."
0329efd2
AF
40md5_file=`md5sum /tmp/download.iso | cut -d" " -f1`
41md5_down=`cat /tmp/download.iso.md5 | cut -d" " -f1`
42if [ "$md5_file" == "$md5_down" ]; then
f0fa1795
MT
43 echo -n "/tmp/download.iso" > /tmp/source_device
44 exit 0
0f680bcc 45fi
0329efd2 46echo "Error - SKIP"
0f680bcc 47exit 10