On Fri, 2004-06-18 at 13:52, Glen Wagley wrote: > So I got my wireless working and Knoppix was so kind as to include a > wlan script in /etc/init.d/. I went ahead and ran update-rc.d to get > this script to run at boot. Thanks to Phil's post about pump, I'm > getting a LAN IP by running pump -i wlan0. I'd like that to happen > automagically as soon as the wlan script is executed at boot. Should I > just add that to the existing script or put it in a separate one. It > makes sense to put it in the existing script so I could handle the > start/stop cases but is there a better practice?
I'm not sure about the wlan script in init.d, but in Debian I've used
the /etc/network/interfaces file to run scripts associated with
different interfaces. I can only describe a bit of what 'man
interfaces' can offer. In the above file, stanzas beginning with
'iface' are details regarding the bringing up of that interface (e.g.,
address, netmask, etc.). These are the options of bringing up the
interface (from the man page):
up command
Run command after bringing the interface up.
pre-up command
Run command before bringing the interface up.
down command
Run command before taking the interface down.
post-down command
Run command after taking the interface down.
This is also from the man page:
"If one of the commands fails, none of the others will be executed but
the interface will still be configured. (You can ensure a command
never fails by suffixing '|| true'.)".
So, here's an example:
# My configuration
iface eth0 inet dhcp
up /usr/bin/foo
down /usr/bin/bar
Casey
signature.asc
Description: This is a digitally signed message part
____________________ BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
