From a331218718282c5496ff062a0f6aa55908224862 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 24 Jun 2013 21:38:08 +0200 Subject: Reorganizing components in source tree. --- components/9990-netboot.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 components/9990-netboot.sh (limited to 'components/9990-netboot.sh') diff --git a/components/9990-netboot.sh b/components/9990-netboot.sh new file mode 100755 index 0000000..5054fb8 --- /dev/null +++ b/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