Installer: Add installmedia download support.
authorArne Fitzenreiter <arne_f@ipfire.org>
Thu, 25 Nov 2010 13:18:11 +0000 (14:18 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Thu, 25 Nov 2010 13:18:11 +0000 (14:18 +0100)
18 files changed:
config/initrd/dhcpc/70-dhcpcd.exe [new file with mode: 0755]
config/install/rc_installer
config/rootfiles/installer/dhcpcd [new symlink]
config/rootfiles/installer/files [new file with mode: 0644]
config/rootfiles/installer/iproute2 [new symlink]
config/rootfiles/installer/libsafe [new symlink]
config/rootfiles/installer/misc-progs
config/rootfiles/installer/network-modules [new file with mode: 0644]
config/rootfiles/installer/openssl [new symlink]
config/rootfiles/installer/wget [new symlink]
langs/de/install/lang_de.c
langs/en/install/lang_en.c
langs/es/install/lang_es.c
langs/fr/install/lang_fr.c
lfs/initrd
lfs/installer
src/install+setup/install/downloadsource.sh [new file with mode: 0644]
src/install+setup/install/main.c

diff --git a/config/initrd/dhcpc/70-dhcpcd.exe b/config/initrd/dhcpc/70-dhcpcd.exe
new file mode 100755 (executable)
index 0000000..4100fc9
--- /dev/null
@@ -0,0 +1,32 @@
+#/bin/bash
+########################################################################
+# Begin
+#
+# Description : DHCP Client Script (initrd version)
+#
+# Authors     : Arne Fitzenreiter - arne_f@ipfire.org
+#
+# Version     : 02.00
+#
+# Notes       : 
+#
+########################################################################
+
+dhcpcd_up()
+{
+       set | grep "^new_" | sed "s|^new_||g" | \
+       sed "s|'||g" | \
+       sort > /var/ipfire/dhcpc/dhcpcd-$interface.info
+
+       DNS=`grep "domain_name_servers" /var/ipfire/dhcpc/dhcpcd-$interface.info | cut -d"=" -f2`
+       DNS1=`echo $DNS | cut -d" " -f1`
+       DNS2=`echo $DNS | cut -d" " -f2`
+
+       echo "nameserver $DNS1" > /etc/resolv.conf
+       echo "nameserver $DNS2" >> /etc/resolv.conf
+
+}
+
+case "$reason" in
+BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT|STATIC)       dhcpcd_up;;
+esac
index 0c3ec09b6672846f6e6db899d46751ab746fce89..c1dd5b6e54ca98f4da0dd6ae41bef3ce684892cb 100644 (file)
@@ -9,6 +9,7 @@ ln -snf /proc/self/fd/0 /dev/stdin
 ln -snf /proc/self/fd/1 /dev/stdout
 ln -snf /proc/self/fd/2 /dev/stderr
 ln -s /proc/kcore /dev/core
+mount tmpfs -t tmpfs /tmp
 
 echo "Starting shells on tty2 and tty3 ..."
 /usr/local/bin/iowrap /dev/tty2 /bin/bash &
diff --git a/config/rootfiles/installer/dhcpcd b/config/rootfiles/installer/dhcpcd
new file mode 120000 (symlink)
index 0000000..ea5996c
--- /dev/null
@@ -0,0 +1 @@
+../common/dhcpcd
\ No newline at end of file
diff --git a/config/rootfiles/installer/files b/config/rootfiles/installer/files
new file mode 100644 (file)
index 0000000..aba14d8
--- /dev/null
@@ -0,0 +1,4 @@
+etc/host.conf
+etc/hosts
+etc/protocols
+
diff --git a/config/rootfiles/installer/iproute2 b/config/rootfiles/installer/iproute2
new file mode 120000 (symlink)
index 0000000..efe83c5
--- /dev/null
@@ -0,0 +1 @@
+../common/iproute2
\ No newline at end of file
diff --git a/config/rootfiles/installer/libsafe b/config/rootfiles/installer/libsafe
new file mode 120000 (symlink)
index 0000000..c31e31d
--- /dev/null
@@ -0,0 +1 @@
+../common/libsafe
\ No newline at end of file
index ac5e8dd9df489425d8ea1f791aaf62d3ae3b29e9..1e4226bd91dd27c1f0cf96d9cc04a401b9ffb95c 100644 (file)
@@ -1 +1,2 @@
+bin/ping
 usr/local/bin/iowrap
diff --git a/config/rootfiles/installer/network-modules b/config/rootfiles/installer/network-modules
new file mode 100644 (file)
index 0000000..50c2179
--- /dev/null
@@ -0,0 +1,176 @@
+lib/modules/KVER-ipfire/kernel/drivers/net/3c501.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/3c503.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/3c505.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/3c507.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/3c509.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/3c515.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/3c523.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/3c527.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/3c59x.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/8139cp.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/8139too.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/82596.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/8390.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/8390p.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/ac3200.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/acenic.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/amd8111e.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/at1700.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/atl1c/atl1c.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/atl1e/atl1e.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/atlx/atl1.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/atlx/atl2.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/atp.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/b44.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/benet/be2net.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/bnx2.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/bnx2x.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/bsd_comp.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/cassini.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/chelsio/cxgb.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/cnic.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/cs89x0.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/cxgb3/cxgb3.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/de600.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/de620.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/depca.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/dl2k.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/dnet.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/dummy.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/e100.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/e1000/e1000.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/e1000e/e1000e.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/e2100.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/eepro.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/eexpress.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/enic/enic.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/epic100.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/eql.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/es3210.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/eth16i.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/ethoc.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/ewrk3.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/fealnx.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/forcedeth.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/hamachi.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/hp-plus.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/hp.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/hp100.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/ibmlana.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/ifb.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/igb/igb.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/igbvf/igbvf.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/imq.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/ipg.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/ixgb/ixgb.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/ixgbe/ixgbe.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/jme.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/ks8842.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/ks8851_mll.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/lance.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/lne390.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/lp486e.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/macvlan.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/mdio.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/mii.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/mlx4/mlx4_core.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/mlx4/mlx4_en.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/myri10ge/myri10ge.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/natsemi.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/ne.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/ne2.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/ne2k-pci.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/ne3210.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/netxen/netxen_nic.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/ni52.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/ni65.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/niu.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/ns83820.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/pcmcia/3c574_cs.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/pcmcia/3c589_cs.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/pcmcia/axnet_cs.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/pcmcia/fmvj18x_cs.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/pcmcia/nmclan_cs.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/pcmcia/pcnet_cs.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/pcmcia/smc91c92_cs.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/pcmcia/xirc2ps_cs.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/pcnet32.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/phy/broadcom.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/phy/cicada.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/phy/davicom.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/phy/et1011c.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/phy/icplus.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/phy/lxt.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/phy/marvell.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/phy/mdio-bitbang.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/phy/national.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/phy/qsemi.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/phy/realtek.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/phy/smsc.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/phy/ste10Xp.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/phy/vitesse.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/qla3xxx.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/qlge/qlge.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/r6040.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/r8169.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/s2io.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/sb1000.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/sc92031.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/seeq8005.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/sfc/sfc.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/sis190.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/sis900.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/skge.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/sky2.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/slhc.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/smc-mca.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/smc-ultra.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/smc-ultra32.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/smc9194.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/smsc9420.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/starfire.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/sundance.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/sungem.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/sungem_phy.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/sunhme.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/tehuti.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/tg3.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/tlan.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/tulip/de2104x.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/tulip/de4x5.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/tulip/dmfe.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/tulip/tulip.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/tulip/uli526x.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/tulip/winbond-840.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/tulip/xircom_cb.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/typhoon.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/usb/asix.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/usb/catc.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/usb/cdc-phonet.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/usb/cdc_eem.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/usb/cdc_ether.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/usb/cdc_subset.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/usb/dm9601.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/usb/gl620a.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/usb/hso.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/usb/int51x1.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/usb/kaweth.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/usb/mcs7830.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/usb/net1080.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/usb/pegasus.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/usb/plusb.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/usb/rndis_host.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/usb/rtl8150.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/usb/smsc95xx.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/usb/usbnet.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/usb/zaurus.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/veth.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/via-rhine.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/via-velocity.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/virtio_net.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/vmxnet3/vmxnet3.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/vxge/vxge.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/wd.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/yellowfin.ko
+lib/modules/KVER-ipfire/kernel/drivers/net/znet.ko
+lib/modules/KVER-ipfire/kernel/drivers/staging/et131x/et131x.ko
diff --git a/config/rootfiles/installer/openssl b/config/rootfiles/installer/openssl
new file mode 120000 (symlink)
index 0000000..8317ffd
--- /dev/null
@@ -0,0 +1 @@
+../common/openssl
\ No newline at end of file
diff --git a/config/rootfiles/installer/wget b/config/rootfiles/installer/wget
new file mode 120000 (symlink)
index 0000000..b75cdbc
--- /dev/null
@@ -0,0 +1 @@
+../common/wget
\ No newline at end of file
index 87e06cf4d3516f35572fc29d5071028dde2844b1..a1df97c22de95639ae296a2737ce22bb121c048c 100644 (file)
@@ -583,5 +583,10 @@ char *de_tr[] = {
 "Ext4 - Dateisystem mit Journal",
 /* TR_REISERFS_DESCR */
 "ReiserFS - Dateisystem mit Journal",
-}; 
-  
+/* TR_NO_LOCAL_SOURCE */
+"Kein lokales Quellmedium gefunden. Starte Download.",
+/* TR_DOWNLOADING_ISO */
+"Lade Installations-Abbild ...",
+/* TR_DOWNLOAD_ERROR */
+"Beim Herunterladen ist ein Fehler aufgetreten!",
+};
index ee65330a6fc5fb3d89a57c0ad79c75886b06bc88..b8edeac15922d5dbb7ded0bc99e5c5eeeccbbdb3 100644 (file)
@@ -579,5 +579,10 @@ char *en_tr[] = {
 "Ext4 - Filesystem with Journal",
 /* TR_REISERFS_DESCR */
 "ReiserFS - Filesystem with Journal",
-}; 
-  
+/* TR_NO_LOCAL_SOURCE */
+"No local source media found. Starting download.",
+/* TR_DOWNLOADING_ISO */
+"Downloading Installation-Image ...",
+/* TR_DOWNLOAD_ERROR */
+"Error while downloading!",
+};
index 7dd06521ed15fe0420f7bbe8e0ce418f16f52bcc..63e2eab0f45ecfee90a517272f9619627492f9f5 100644 (file)
@@ -575,5 +575,10 @@ char *es_tr[] = {
 "Ext4 - Filesystem with Journal",
 /* TR_REISERFS_DESCR */
 "ReiserFS - Filesystem with Journal",
-}; 
-  
+/* TR_NO_LOCAL_SOURCE */
+"No local source media found. Starting download.",
+/* TR_DOWNLOADING_ISO */
+"Downloading Installation-Image ...",
+/* TR_DOWNLOAD_ERROR */
+"Error while downloading!",
+};
index 506faf52b0e6489926a7a438aa3574e44600ac26..d2abdbad185bbb4d295be413ecfa67f286c6e7a0 100644 (file)
@@ -575,5 +575,10 @@ char *fr_tr[] = {
 "Ext4 - Filesystem with Journal",
 /* TR_REISERFS_DESCR */
 "ReiserFS - Filesystem with Journal",
-}; 
-  
+/* TR_NO_LOCAL_SOURCE */
+"No local source media found. Starting download.",
+/* TR_DOWNLOADING_ISO */
+"Downloading Installation-Image ...",
+/* TR_DOWNLOAD_ERROR */
+"Error while downloading!",
+};
index cf2dc3f475845d43c55da572518df2eb48c0b264..c5ceb3200e085cb4755d0f6098eb444dfa358223 100644 (file)
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007  Michael Tremer & Christian Schmidt                      #
+# Copyright (C) 2010  IPFire Team  <info@ipfire.org>                          #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -56,6 +56,10 @@ $(TARGET) :
 
        # Copy Files packages for installer
        find $(DIR_SRC)/config/rootfiles/installer/* -maxdepth 1 | xargs cat | grep -v "^#" > /tmp/ROOTFILES
+
+       # Patch Kernel Version to rootfiles
+       sed -e "s/KVER/$(KVER)/g" -i /tmp/ROOTFILES
+
        -cd / && cpio -d -p /install/initrd < /tmp/ROOTFILES
 
        cd /install/initrd/etc && rm -f fstab
@@ -71,11 +75,15 @@ $(TARGET) :
        -mkdir -p /install/{images,mnt}
        rm -rf /install/mnt/*
 
-       cp -aR /install/initrd/* /install/mnt
-
+       #Build Module deps for installer.
+       depmod -a -b /install/initrd/ -F /boot/System.map-$(KVER)-ipfire $(KVER)-ipfire
        # Remove binary depmod files
        rm -rf /install/initrd/lib/modules/$(KVER)-ipfire/modules.*.bin
 
+       #Name service from dhcpcd
+       cp -f /etc/nsswitch.conf /install/initrd/etc/
+       cp -f $(DIR_SRC)/config/initrd/dhcpc/* /install/initrd/var/ipfire/dhcpc/dhcpcd-hooks/
+
        cd /install/initrd && find . | cpio -o -H newc | lzma > /install/images/initrd
        cd /install/initrd && find ./ -ls > $(DIR_INFO)/_build.initrd.log
 
index dad9200100df1d488dda7260663630ad535ef6b3..553d59901c9dfd30758610c92303cb90fe4cecbd 100644 (file)
@@ -61,6 +61,9 @@ $(TARGET) :
            -DNAME='\"$(NAME)\"' -DSNAME='\"$(SNAME)\"' -DVERSION='\"$(VERSION)\"' \
             -DSLOGAN='\"$(SLOGAN)\"' -DCONFIG_ROOT='\"$(CONFIG_ROOT)\"' -DKERNEL_VERSION='\"$(KVER)\"'"
        cd $(DIR_APP)/install && install -v -m 0755 install probenic.sh \
-               probehw.sh mountsource.sh mountdest.sh /install/initrd/bin
+               probehw.sh downloadsource.sh mountsource.sh mountdest.sh /install/initrd/bin
+       #Patch ISO Name for download ...
+       sed -i -e "s|ipfire.iso|$(SNAME)-$(VERSION).$(MACHINE)-full-core$(CORE).iso|g" \
+                               /install/initrd/bin/downloadsource.sh
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
diff --git a/src/install+setup/install/downloadsource.sh b/src/install+setup/install/downloadsource.sh
new file mode 100644 (file)
index 0000000..ef7d349
--- /dev/null
@@ -0,0 +1,52 @@
+#!/bin/sh
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2010  IPFire Team  <info@ipfire.org>                          #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+# Path for testing. Need to be changed for release!
+IPFireISO=people.ipfire.org/~arne_f/testing/next/ipfire.iso
+#IPFireISO=download.ipfire.org/iso/ipfire.iso
+
+#Get user defined download from boot cmdline
+grep "netinstall=" /proc/cmdline > /dev/null && CMDLINE=1
+if ( [ "$CMDLINE" == "1" ]); then
+       read CMDLINE < /proc/cmdline
+       POS=${CMDLINE%%netinstall*}
+       POS=${#POS}
+       IPFireISO=`echo ${CMDLINE:POS} | cut -d"=" -f2 | cut -d" " -f1`
+fi
+
+echo
+echo "Configure Network with DHCP..."
+dhcpcd
+echo
+echo "Download with wget..."
+wget $IPFireISO -O /tmp/download.iso -t3 -U IPFire_NetInstall/2.x
+echo
+echo "Checking download..."
+mount /tmp/download.iso -o loop /cdrom 2> /dev/null
+if [ -n "$(ls /cdrom/ipfire-*.tlz 2>/dev/null)" ]; then
+       echo -n "null" > /tmp/source_device
+       echo "Found tarball in /tmp/download.iso"
+       exit 0
+else
+       echo "Found no tarballs in /tmp/download.iso - SKIP"
+fi
+umount /cdrom 2> /dev/null
+exit 10
index 1f615d0d63c74166f30dbde4d99234b0c46b8524..5de914f7612c02106428bfd217a93e12d7debeaa 100644 (file)
@@ -156,19 +156,17 @@ int main(int argc, char *argv[])
                }
        }
 
-       switch (mysystem("/bin/mountsource.sh")) {
-           case 0:
-                               break;
-           case 10:
-       errorbox(ctr[TR_NO_CDROM]);
-               goto EXIT;
-       }
+       mysystem("/bin/mountsource.sh");
 
-       /* read source drive letter */
        if ((handle = fopen("/tmp/source_device", "r")) == NULL) {
-               errorbox(ctr[TR_ERROR_PROBING_CDROM]);
-               goto EXIT;
+               newtWinMessage(title, ctr[TR_OK], ctr[TR_NO_LOCAL_SOURCE]);
+               runcommandwithstatus("/bin/downloadsource.sh",ctr[TR_DOWNLOADING_ISO]);
+               if ((handle = fopen("/tmp/source_device", "r")) == NULL) {
+                       errorbox(ctr[TR_DOWNLOAD_ERROR]);
+                       goto EXIT;
+               }
        }
+
        fgets(sourcedrive, 5, handle);
        fprintf(flog, "Source drive: %s\n", sourcedrive);
        fclose(handle);