Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
add comment

1 Answer 1

up vote 5 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. –  Rajkumar R 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. –  ultrasawblade 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. –  Rajkumar R 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 ... –  ultrasawblade Aug 20 '12 at 15:33
add comment

Your Answer

 
discard

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.