Fixing http boot:
authorMichal Suchanek <hramrach@centrum.cz>
Fri, 4 Jun 2010 07:23:39 +0000 (09:23 +0200)
committerDaniel Baumann <daniel@debian.org>
Wed, 9 Mar 2011 16:53:26 +0000 (17:53 +0100)
- set NETBOOT as the other netboot methods do.
- do not fall through to NFS if HTTP fails.

scripts/live

index afe0f4b..fd4a5e4 100755 (executable)
@@ -682,8 +682,6 @@ copy_live_to ()
 
 do_netmount ()
 {
-       rc=1
-
        modprobe -q af_packet # For DHCP
 
        udevadm trigger
@@ -761,10 +759,12 @@ do_netmount ()
                NFSROOT=${ROOTSERVER}:${ROOTPATH}
        fi
 
-       if ( [ -n "${FETCH}" ] || [ -n "${HTTPFS}" ] || [ -n "${FTPFS}" ] ) && do_httpmount
+       rc=1
+
+       if ( [ -n "${FETCH}" ] || [ -n "${HTTPFS}" ] || [ -n "${FTPFS}" ] )
        then
-               rc=0
-               return ${rc}
+               do_httpmount
+               return $?
        fi
 
        if [ "${NFSROOT#*:}" = "${NFSROOT}" ] && [ "$NETBOOT" != "cifs" ]
@@ -846,7 +846,10 @@ do_httpmount ()
 
        if [ ${rc} != 0 ]
        then
-           umount "${mountpoint}"
+               umount "${mountpoint}"
+       elif [ "${webfile}"  != "FETCH" ] ; then
+               NETBOOT="${webfile}"
+               export NETBOOT
        fi
 
        return ${rc}