
58
insmod /modules/net/ccil.o
Example 3 [FC 3, 2.6.9-1.667smp]:
# load the drivers
insmod /modules/net/sunrpc.ko
insmod /modules/net/lockd.ko
insmod /modules/net/nfs.ko
insmod /modules/net/ccil.ko
The following is the
linuxrc
file used in this example:
#!/bin/bash
export PATH=/bin:/sbin:
mount -t proc none /proc
mount -t devpts none /dev/pts
# Parse the kernel command line
cmdline="$(cat /proc/cmdline 2>/dev/null)"
for i in $cmdline; do case "$i" in
ip=*|IP=*|nm=*|NM=*|gw=*|GW=*|nfsdir=*|NFSDIR=*) eval $i;; esac; done
[ -n "$ip" ] && IP="$ip"
[ -n "$nm" ] && NM="$nm"
[ -n "$gw" ] && GW="$gw"
[ -n "$nfsdir" ] && NFSDIR="$nfsdir"
# Load the NFS drivers
insmod /modules/net/sunrpc.ko
insmod /modules/net/lockd.ko
insmod /modules/net/nfs.ko
# Load the RAW socket support driver
#insmod /modules/net/af_packet.ko
# Load the Ammasso 1100 firmware
echo /ccore/ccos.boot /ccore/ccos.bin 0x`cat /ccore/ccos.bin_start`
/ccore/ccos.boot /ccore/ccos.bin 0x`cat /ccore/ccos.bin_start`
# Load the ccilnet driver
insmod /modules/net/ccil.ko
# Define the interface name
export IFACE=ccilnet0
ifconfig lo 127.0.0.1 up
ifconfig
lsmod
# Make 100 DHCP requests
for i in 1 2 3 4 5 6 7 8 9 10; do
for j in 1 2 3 4 5 6 7 8 9 10; do
echo udhcpc -q -n -i $IFACE
udhcpc -q -n -i $IFACE && DHCP="true"
[ -n "$DHCP" ] && break
echo "No answer from network"
done
done
# Break to a shell if we don't get a DHCP response
[ -z "$DHCP" ] && /bin/ash
# Display the interface configuration
ifconfig $IFACE