Adding upstream version 4.0~a7.
[debian-live-boot.git] / scripts / boot / 9990-netboot.sh
blob5054fb88fa42ab2c76e795c3680d82604a06e500
1 #!/bin/sh
3 #set -e
5 do_netmount()
7 do_netsetup
9 if [ "${NFSROOT}" = "auto" ]
10 then
11 NFSROOT=${ROOTSERVER}:${ROOTPATH}
14 rc=1
16 if ( [ -n "${FETCH}" ] || [ -n "${HTTPFS}" ] || [ -n "${FTPFS}" ] )
17 then
18 do_httpmount
19 return $?
22 if [ "${NFSROOT#*:}" = "${NFSROOT}" ] && [ "$NETBOOT" != "cifs" ]
23 then
24 NFSROOT=${ROOTSERVER}:${NFSROOT}
27 log_begin_msg "Trying netboot from ${NFSROOT}"
29 if [ "${NETBOOT}" != "nfs" ] && do_cifsmount
30 then
31 rc=0
32 elif do_nfsmount
33 then
34 NETBOOT="nfs"
35 export NETBOOT
36 rc=0
39 log_end_msg
40 return ${rc}