# Filename: /linuxrc
# Purpose: minirt for kernel 2.6 running on grml live-cd
# Authors: (c) Klaus Knopper <knoppix@knopper.net>, (c) Michael Prokop <mika@grml.org>
-# 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
if test -f /modules/div/usbcore.ko; then
$INSMOD /modules/div/usbcore.ko >/dev/null 2>&1
FOUNDUSB=""
- for i in $USB2 uhci-hcd.ko ohci-hcd.ko ; do
+ for i in $USB2 uhci-hcd.ko ohci-hcd.ko usbhid.ko ; do
test -f /modules/div/$i && $INSMOD /modules/div/$i >/dev/null 2>&1 && FOUNDUSB="yes"
done
if test -n "$FOUNDUSB"; then
[ -n "$nfsdir" ] && NFS="$nfsdir"
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
KERNELVER=`uname -r`
for mod in `find /lib/modules/$KERNELVER/kernel/drivers/net/ -name \*.ko` ; do
- echo `basename $mod | tr -d \.ko` >> /modules.load
+ echo `basename $mod | sed -e 's/\.ko$//'` >> /modules.load
done
modules_to_load=`cat /modules.load | xargs`
# FIXME modprobe is buggy from busybox
+ log_begin_msg "Trying to load network driver(s)." ; echo
modLoad()
{
for mod in $@ ; do
# loading additional modules
modLoad sunrpc lockd af_packet nfs
- /static/udhcpc --foreground --quit --script=/static/udhcp-config.sh
- #echo "press <enter> to start a system shell and configure your system"
- #sh
+ dhcp_iface_=$(getbootparam dhcp_iface)
+ if [ -z "$dhcp_iface_" ]; then
+ dhcp_iface_=`ifconfig -a | grep '^eth' | sed 's/ .*//'`
+ 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 the old dir structures
rdir
#rm -rf /myusr /mylib
- log_begin_msg "${RED}Debug: NFS = ${NFS}${NORMAL}"
- log_begin_msg -n "${CRE}${NORMAL}Looking for GRML in: ${MAGENTA}$NFS${NORMAL}"
+ 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
then
if test -f /cdrom/$GRML_DIR/$GRML_NAME
then
- log_begin_msg -n "Accessing grml CDROM at ${MAGENTA}$NFS${NORMAL}" ; echo " $SUCCESS"
+ log_begin_msg "Accessing grml CDROM at ${MAGENTA}$NFS${NORMAL}" ; echo "$SUCCESS"
FOUND_GRML="$NFS"
break
fi