On 05/15/2011 01:22 AM, DJ Lucas wrote:
> On 05/15/2011 12:11 AM, Zachary Kotlarek wrote:
>> Could we just do this in ifdown:
>>
>>      if [ -x /lib/network-services/dhcp ]; then
>>              /lib/network-services/dhcp $interface down
>>      fi
>>
>> and assume that whatever DHCP client is installed (if any) provides a script 
>> appropriate to handle the interface shutdown?
>>
>>      Zach
> Actually, yeah, that is a great idea! We had planned to merge the dhcp
> scripts anyway to simplify Gnome-System-Tools interface management in BLFS.
>
Okay, couple of caveats, but nothing major. For dhcpcd it is simply a 
check for $PIDFILE or exit 0 and guard the source of $IFCONFIG with an 
if then. For dhclient, it is a check of dhclient.leases, and wrap source 
of $IFCONFIG. Of course, both will have to have the install target 
service as dhcp with a different file name in the tarball (which we 
wanted anyway). Problem with dhclient is that the value of DHCP_STOP 
will always be empty...all interfaces using dhclient will go. If you do 
'service network stop' then no big deal. OTOH, if you execute ifdown 
ethn, and you have dhclient configured on multiple interfaces, not so 
good. I still don't understand why anyone would choose dhclient over 
dhcpcd. This will work, I just need a slightly more intelligent way to 
handle it, might actually be easier to provide a default IFCONFIG values 
in each service script, and walk /lib/network-services.

-- DJ Lucas

-- 
This message has been scanned for viruses and
dangerous content, and is believed to be clean.

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to