Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to run the command Urlsnarf -n -i p33p1 >> file when the p33p1 network interface gets its IP address.

Initially I tried to run the command at bootup by adding the a crontab entry @reboot command. For some reason, Urlsnarf failed to start and I assume it is because the NIC is not ready yet.

I am using Fedora Beefy Miracle.

share|improve this question
up vote 6 down vote accepted

If you are using isc-dhcp-client, provisions are made for "hook scripts" which will run at various stages of the DHCP process, including when an address is acquired. /etc/dhcp/dhclient-enter-hooks.d or similar.

share|improve this answer
No, i am not using isc-dhcp-server. This is a plain fedora installation for a pc connected to a NetGear router. – atree Aug 20 '12 at 13:47
Haha, big goof on my part. I meant isc-dhcp-client - edited. Anyway, whatever DHCP client software you are using, look to see if it has this feature. – LawrenceC Aug 20 '12 at 14:02
No dhclient-enter-hooks.d file under /etc/dhcp. I have no special dhcp client intalled, just the default one. – atree Aug 20 '12 at 14:22
forums.freebsd.org/showthread.php?t=8513 - I have it on my system but I may have an older version of dhclient ... – LawrenceC Aug 20 '12 at 15:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.