From: Michael Prokop Date: Fri, 16 Mar 2007 14:56:18 +0000 (+0100) Subject: adjust the FIXME modprobe is buggy from busybox; adust /static/udhcpc code X-Git-Tag: 0.83 X-Git-Url: http://git.grml.org/?p=grml-terminalserver.git;a=commitdiff_plain;h=9baed3f0f85cc423a0c97c5b9f49cd2bbf581fec adjust the FIXME modprobe is buggy from busybox; adust /static/udhcpc code --- diff --git a/debian/changelog b/debian/changelog index 6ac177c..9ff5e67 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,9 @@ grml-terminalserver (0.83) unstable; urgency=low fixes and updates for current version of busybox (using busybox-1.4.1 now) * linuxrc: use /static/xargs instead of xargs + * linuxrc: remove obsolete "FIXME modprobe is buggy from + busybox" and adjust code corresponding + * adjust code for udhcpc from busybox * grml-terminalserver-config: do not copy udhcpc anymore [ Michael Gebetsroither ] diff --git a/linuxrc b/linuxrc index 0f76c88..52d1c43 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: Fri Mar 16 11:35:19 CET 2007 [mika] +# Latest change: Fre Mär 16 15:55:37 CET 2007 [mika] ####################################################################################### # hardcoded configurable options @@ -516,21 +516,18 @@ if [ -n "$NFS" ]; then tmp_="$(getbootparam nfsdir)" log_begin_msg "Bootoption NFS found." ; echo "$SUCCESS" - cdir + /static/cdir - # FIXME modprobe is buggy from busybox log_begin_msg "Trying to load network driver(s)." ; echo modLoad() { for mod in $@ ; do - tmp_="`modprobe -vn $mod 2>/dev/null`" - if [ $? -ne 0 ]; then - continue + if [ -n "$DEBUG" ] ; then + echo "Debug: trying to load $mod:" + modprobe -v $mod + else + modprobe $mod 2>/dev/null fi - echo "$tmp_" | while read i; do - # be quiet by default, be verbose only with bootoption debuglinuxrc - [ -n "$DEBUG" ] && eval "$i" || eval "$i" 1>/dev/null 2>/dev/null - done done } # modules.alias and modules.dep are in place so USE IT :)! @@ -544,6 +541,12 @@ if [ -n "$NFS" ]; 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 @@ -552,8 +555,7 @@ if [ -n "$NFS" ]; then done # recreate dir layout + remove extra modules - rdir - #rm -rf /mylib + /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