From 32322960234c8ec91e0d42835a3ec5ee63305070 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 2 Feb 2019 11:00:00 +0100 Subject: Adding upstream version 20190202. Signed-off-by: Daniel Baumann --- system-boot/components/9990-netboot.sh | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 system-boot/components/9990-netboot.sh (limited to 'system-boot/components/9990-netboot.sh') diff --git a/system-boot/components/9990-netboot.sh b/system-boot/components/9990-netboot.sh new file mode 100755 index 0000000..5054fb8 --- /dev/null +++ b/system-boot/components/9990-netboot.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +#set -e + +do_netmount() +{ + do_netsetup + + if [ "${NFSROOT}" = "auto" ] + then + NFSROOT=${ROOTSERVER}:${ROOTPATH} + fi + + rc=1 + + if ( [ -n "${FETCH}" ] || [ -n "${HTTPFS}" ] || [ -n "${FTPFS}" ] ) + then + do_httpmount + return $? + fi + + if [ "${NFSROOT#*:}" = "${NFSROOT}" ] && [ "$NETBOOT" != "cifs" ] + then + NFSROOT=${ROOTSERVER}:${NFSROOT} + fi + + log_begin_msg "Trying netboot from ${NFSROOT}" + + if [ "${NETBOOT}" != "nfs" ] && do_cifsmount + then + rc=0 + elif do_nfsmount + then + NETBOOT="nfs" + export NETBOOT + rc=0 + fi + + log_end_msg + return ${rc} +} -- cgit v1.2.3