From: Marc H. <ma...@mi...> - 2006-11-21 04:28:33
|
"Kit Plummer" <kit...@gm...> writes: >> Ok, I'm down to needed whatever provides the if-up.d if-down.d stuff. >> Anyone have a pointer on the right package/kernel mod to provide that >> stuff? The ifupdown applet in busybox, which provides the ifup and ifdown commands, invokes the scripts in if-up.d and if-down.d. However, I recently learned that ifup invoked udhcpc with the -b flag, which causes it to background itself immediately, instead of after the lease is acquired. This means if-up.d gets run before the dhcp lease is acquired. (I think if you use a static IP, then if-up.d should be fine, but I have not tested this.) If you want something to run when a dhcp lease is established, you can add it to the end of the renew|bound) case in /usr/share/udhcpc/default.script. I'm running ntpdate, ntpd, and some custom code from there, and happens at the right time after boot. Marc |