dhcpd configuration

DJ Lucas dj_me at swbell.net
Wed Apr 24 13:15:28 PDT 2002


dhclient does not require that you run ifconfig eth0 down exactly..  you can
use the the -r flag. This won't kill the daemon, however it will release the
IP correctly, and down the interface.   Hope this helps...better yet why not
force the use of the full path in the variable name, and force that the
script uses the correct flags for downing the interface?  It would require
only one more variable in ifconfig.ethX and no if/then statemenst in
ifdown.ethX.  For instance...(untested of course) ifup is "$DHCP_PROG
$DHCP_OPT ethX"  and ifdown uses "$DHCP_PROG $DHCP_STOP ethX".

Here even easier.....cause I'm too confused on how to explain it..I just
show what I was thinking..heck..I might not even be on the same page as
ya'll...but here anyways.  I don't know if the syntax is correct below, it's
just what was on the brain.

# Begin /etc/sysconfig/network-scripts/ifconfig.eth0
# dhcpcd version

# End /etc/sysconfig/network-scripts/ifconfig.eth0

# Begin /etc/sysconfig/network-scripts/ifconfig.eth0
# dhclient version
# End /etc/sysconfig/network-scripts/ifconfig.eth0

# Begin /etc/sysconfig/network-devices/ifup.eth0
#! /bin/sh
source /etc/rc.d/init.d/functions
source /etc/sysconfig/network-devices/ifconfig.eth0
echo -n "Bringing up the eth0 interface via DHCP..."
# End /etc/sysconfig/network-devices/ifup.eth0

# Begin /etc/sysconfig/network-devices/ifdown.eth0
#! /bin/sh
source /etc/rc.d/init.d/functions
source /etc/sysconfig/network-devices/ifconfig.eth0
echo "Bringing down the eth0 interface..."
# End /etc/sysconfig/network-devices/ifdown.eth0

This way you don't even have to run the if and extract the prog name from
the path.  Does this work??  I mean we have to force the users to use the
full path for DHCP_PROG.  WAIT..I don't know if it kills the pid for
dhclient..I'm assuming it does not, but it might do it...or that might have
been a waste of time for me to write that...lol..  Oh well.

Hope maybe that helped (or confused) some of you ;-),

D.J. Lucas
dj_me at swbell.net

----- Original Message -----
From: "Larry Lawrence" <llawre_ at excite.com>
To: <blfs-dev at linuxfromscratch.org>
Sent: Wednesday, April 24, 2002 11:07 AM
Subject: RE: dhcpd configuration

> There will be a modification to the ifdown-eth0 script.
> In english, dhcp requires ifconfig eth0 down, dhcpcd does not, it uses -k
> release interface and evaluate_retval is added since killproc is removed.
> if DHCP_PROG = dhcpcd
>         dhcpcd -k eth0
> else
>         ifconfig eth0 down
> evaluate_retval
> I'll work on proper syntax to implement the above and then test on a dhcp
> and dhcpcd clients.
> If anyone sees a cleaner solution to the above, please let me know. I am
> very concerned with the test DHCP_PROG = dhcpcd as some will be setting
> varible to full path, some not.
> Larry
> --
> Unsubscribe: send email to listar at linuxfromscratch.org
> and put 'unsubscribe blfs-dev' in the subject header of the message

Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe blfs-dev' in the subject header of the message

More information about the blfs-dev mailing list