X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=linuxrc;h=3ba7a58d1e9eed86dc209f554a3e4d3e45931d4a;hb=030a3f5281638120cbd9ce637689d2142e2699b9;hp=808422d1e91222f6b641da262c7c12ff14048f64;hpb=d599ecad47905edf46a173f2ab0a3c05e7834b06;p=grml-terminalserver.git diff --git a/linuxrc b/linuxrc index 808422d..3ba7a58 100755 --- a/linuxrc +++ b/linuxrc @@ -2,7 +2,7 @@ # Filename: /linuxrc # Purpose: minirt for kernel 2.6 running on grml live-cd # Authors: (c) Klaus Knopper , (c) Michael Prokop -# Latest change: Don Nov 16 14:46:00 CET 2006 [mika] +# Latest change: Don Nov 16 19:08:07 CET 2006 [mika] ####################################################################################### # hardcoded configurable options @@ -508,16 +508,12 @@ esac stage=2 rundebugshell -echo "before NFS" +# NFS for i in $cmdline; do case "$i" in nfsdir=*|NFSDIR=*) eval $i;; esac; done [ -n "$nfsdir" ] && NFS="$nfsdir" -echo "nfsdir=$NFS" -# NFS if [ -n "$NFS" ]; then tmp_="$(getbootparam nfsdir)" - echo -n "checkbootparam nfsdir " - checkbootparam "nfsdir" && echo "OK" || echo "FAILED" - echo "getbootparam nfsdir=\"$tmp_\"" + log_begin_msg "Bootoption NFS found." ; echo "$SUCCESS" # put the mylibs into /lib for discover and udhcpc cdir @@ -532,17 +528,18 @@ if [ -n "$NFS" ]; then for mod in `find /lib/modules/$KERNELVER/kernel/drivers/net/ -name \*.ko` ; do echo `basename $mod | tr -d \.ko` >> /modules.load done - modules_to_load=`cat /modules.load` + modules_to_load=`cat /modules.load | xargs` # FIXME modprobe is buggy from busybox - modules_to_load=`echo $modules_to_load | xargs` + log_begin_msg "Trying to load network driver(s)." modLoad() { for mod in $@ ; do - tmp_="`modprobe -vn $mod`" + tmp_="`modprobe -vn $mod 2>/dev/null`" if [ $? -ne 0 ]; then continue fi + # be quiet by default, be verbose only with bootoption debuglinuxrc [ -n "$DEBUG" ] && eval "$tmp_" || eval "$tmp_" 1>/dev/null 2>/dev/null done } @@ -552,7 +549,8 @@ if [ -n "$NFS" ]; then # loading additional modules modLoad sunrpc lockd af_packet nfs - /static/udhcpc --foreground --quit --script=/static/udhcp-config.sh + log_begin_msg "Requesting network configuration using udhcp: " + /static/udhcpc --foreground --quit --script=/static/udhcp-config.sh && echo "$SUCCESS" || echo "$FAILED" #echo "press to start a system shell and configure your system" #sh @@ -560,20 +558,17 @@ if [ -n "$NFS" ]; then rdir #rm -rf /myusr /mylib - log_begin_msg "${RED}Debug: NFS = ${NFS}${NORMAL}" - log_begin_msg -n "${CRE}${BLUE}Looking for GRML in: ${MAGENTA}$NFS${NORMAL} " + log_begin_msg "Looking for GRML in: ${MAGENTA}$NFS${NORMAL}" if mount -t nfs "$NFS" -o "async,ro,nolock" /cdrom #>/dev/null 2>&1 then if test -f /cdrom/$GRML_DIR/$GRML_NAME then - log_begin_msg -n "${CRE} ${GREEN}Accessing grml CDROM at ${MAGENTA}$NFS${GREEN}...${NORMAL}" + log_begin_msg "Accessing grml CDROM at ${MAGENTA}$NFS${NORMAL}" ; echo " $SUCCESS" FOUND_GRML="$NFS" break fi fi fi -echo "after NFS" - # Now that the right SCSI driver is (hopefully) loaded, try to find CD-ROM if test -z $NFS ; then