Support scripts for Slackware'S DHCP client
===========================================


The DHCPD client (dhcpcd) that Slackware uses up to release 10.2 is missing some
files that allow your computer to run specific commands when the DHCP client
obtains or releases it's IP address.

You can think several things you want to get done:
- run a firewall script right after your network interface obtains an IP address
- change a "dynamic dns" entry on the internet
- add a "nameserver 127.0.0.1" line to /etc/resolv.conf right after the DHCP
  client modifies that file, in case you run your own local nameserver
  (like dnsmasq).
- ....


I provide a few scripts here (a patch to incorporate them into the next
Slackware has been submitted already) that fill the gap.

The two scripts that you will most definitely need are dhcpcd.exe and
dhcpcd-eth0.exe. Basically, the third script (dhcpcd-ath0.exe) is the same as
dhcpcd-eth0.exe but it is provided here to show that you can write a script for
any network interface in your system (eth1, wlan0, ath0, ra0, you name it).
The convention for the executable script's name is "dhcpcd-<interfacename>.exe".
All these script's endings are ".exe" even though they are just shell scripts...
strange but true. I didn't invent that.

The directory that you have to copy the scripts to is /etc/dhcpc/.
Note that there is already a script called dhcpcd-eth0.exe there, but this is
not functional since it will never be called by the DHCP client, and furthermore
it expects the wrong arguments. you can safely overwrite that.

What will happen is that the DHCP client (dhcpcd) will automatically execute
the script "/etc/dhcpc/dhcpcd.exe" whenever an IP address is obtained, renewed
or released. The DHCP client passws the script a couple of parameters that are
explained if you open dhcpcd.exe in an editor.
The dhcpcd.exe script in turn will call an interface-specific script
if available and executable. In the interface-specific script (dhcpcd-eth0.exe
for instance) you can do your own magic.


===============================================================================
Eric Hameleers < alien at slackware dot com > 18 oct 2005
[ICO]NameLast modifiedSizeDescription

[DIR]Parent Directory  -  
[   ]README23-Oct-2005 03:36 2.1K 
[   ]dhcpcd-ath0.exe18-Oct-2005 02:39 855  
[   ]dhcpcd-eth0.exe18-Oct-2005 02:39 855  
[   ]dhcpcd.exe10-Oct-2005 13:33 438  

Apache/2.2.22 Server at www.slackware.com Port 80