-# NFS
-if checkbootparam "nfsdir" ; then
- NFS="$(getbootparam nfsdir)"
-# if test -z $NFS
-# then
-# NFS=192.168.0.1
-# echo "${CRE}${BLUE}No NFS-server given, assuming default $NFS${NORMAL}"
-# fi
- echo "${RED}Debug: NFS = ${NFS}${NORMAL}"
- log_begin_msg "${CRE} ${GREEN}*${NORMAL} Looking for CD-ROM in: ${MAGENTA}$NFS${NORMAL}"
- if mountit -t nfs $NFS "-o ro" >/dev/null 2>&1
+if [ -n "$NFS" ]; then
+ tmp_="$(getbootparam nfsdir)"
+ log_begin_msg "Bootoption NFS found." ; echo "$SUCCESS"
+
+ /static/cdir
+
+ log_begin_msg "Trying to load network driver(s)." ; echo
+ modLoad()
+ {
+ for mod in $@ ; do
+ if [ -n "$DEBUG" ] ; then
+ echo "Debug: trying to load $mod:"
+ modprobe -v $mod
+ else
+ modprobe $mod 2>/dev/null
+ fi
+ done
+ }
+ # modules.alias and modules.dep are in place so USE IT :)!
+ modLoad "$(for x in $(find /sys/devices/ -name modalias); do grep pci: $x; done |/static/xargs)"
+
+ # loading additional modules
+ modLoad sunrpc lockd af_packet nfs
+
+ dhcp_iface_=$(getbootparam dhcp_iface)
+ if [ -z "$dhcp_iface_" ]; then
+ dhcp_iface_=`ifconfig -a | grep '^eth' | sed 's/ .*//'`
+ fi
+
+ # make sure we have a udhcpc executable, if it's not present
+ # assume that busybox provides one
+ if ! [ -x /static/udhcpc ] ; then
+ ln -s /static/busybox /static/udhcpc
+ fi
+
+ for INTERFACE in $dhcp_iface_ ; do
+ log_begin_msg "Requesting network configuration using udhcp for ${INTERFACE}:" ; echo
+ /static/timeout 10 /static/udhcpc --interface="${INTERFACE}" --foreground --quit --script=/static/udhcp-config.sh
+ # echo "press <enter> to start a system shell and configure your system"
+ # sh
+ done
+
+ # recreate dir layout + remove extra modules
+ /static/rdir
+
+ log_begin_msg "Looking for GRML in: ${MAGENTA}$NFS${NORMAL}" ; echo "$SUCCESS"
+ if mount -t nfs "$NFS" -o "async,ro,nolock" /cdrom #>/dev/null 2>&1