DSL Ideas and Suggestions :: HD Install nodhcp fix



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.

put this in the FAQ thread :)

welcome to the forums :)

Quote (ico2 @ Dec. 07 2004,12:02)
put this in the FAQ thread :)

welcome to the forums :)


No.  This is a fix, not a FAQ.

In Un*x there are standard ways of configuring things.  When I make such a change DSL should respect that change.  Network interfaces are only one such problem area.  Off hand I can think of two other things, time zone (including a UTC hwclock) and host name.  The DSL developers need to change the boot-up scripts so that they don't preempt user configurations.

The idea is to solve the problem at the source instead of having all users patch the scripts.

the faq is for details on how to do stuff, go post now, before i steal your howto and post it myself lol :)
Quote (ico2 @ Dec. 08 2004,04:34)
the faq is for details on how to do stuff, go post now, before i steal your howto and post it myself lol :)

Okay. Okay. Okay!!  :p

Next Page...
original here.