longship
Group: Members
Posts: 9
Joined: Nov. 2004 |
|
Posted: Dec. 07 2004,06:58 |
|
The following will allow users to hard configure an IP address using the standard DSL script so that DSL will automagically put up the ethx interface upon boot-up and shut it down properly upon shutdown or reboot. Changes are made to knoppix-autoconfig, knoppix-halt, and knoppix-reboot in /etc/init.d.
Find the section In knoppix-autoconfig that reads:
if checkbootparam "nodhcp"; then ....blah, blah, blah ... else
Replace everything between the "if" and the "else" (the "... blah, blah, blah ..." part) with:
echo " ${BLUE}Skipping DHCP broadcast/network detection as requested on boot commandline.${NORMAL}" echo " ${BLUE}Attempting configured network interfaces.${NORMAL}" NETDEVICES="$(awk '/auto/{for (i = 1; i <= NF; i++) if ($i ~ /eth[0-9]/) printf("%s ", $i)}' </etc/network/interfaces)" for n in $NETDEVICES; do echo " ${MAGENTA}Bringing up $n${NORMAL}" ifup $n done
This will bring up all configured interfaces (in /etc/network/interfaces) upon bootup as long as you add the "nodhcp' boot parameter in 'lilo.conf' in the append line.
In both the knoppix-reboot and the knoppix-halt files:
Replace: ifconfig $n down with: ifdown $n
These bring the interface down properly when you shutdown or reboot.
Now, in order to configure a static IP address, run the net configure script (netcardconfig), or set up the interfaces manually in /etc/network/interfaces. Then add "nodhcp" to the line (inside the quote marks) in /etc/lilo.conf that begins with: append="blah blah blah"
Finally, run "lilo" to update your lilo installation and reboot.
Voila! Network card configurations work properly (and in the Linux way). These changes should be made on the CD images to fix manual network configuration.
|