linux-newbie.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* automating a script with dhcp address changes
@ 2006-09-26 16:03 Karthik Vishwanath
  2006-09-26 17:48 ` Ray Olszewski
  0 siblings, 1 reply; 2+ messages in thread
From: Karthik Vishwanath @ 2006-09-26 16:03 UTC (permalink / raw)
  To: linux-newbie

Hello,

I wanted to run a few tasks each time the IP address on my PC changed. The
PC connects to the network using DHCP and runs ubuntu (LTS, 2.6.15-26). 

I noticed that there was a directory called /etc/network/if-up.d that had
a couple of scripts in them. I was wondering if I could just leave my
script in that directory and expect it to get executed everytime DHCP
changes the machines IP?


Thanks,

-K


-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: automating a script with dhcp address changes
  2006-09-26 16:03 automating a script with dhcp address changes Karthik Vishwanath
@ 2006-09-26 17:48 ` Ray Olszewski
  0 siblings, 0 replies; 2+ messages in thread
From: Ray Olszewski @ 2006-09-26 17:48 UTC (permalink / raw)
  To: linux-newbie

Karthik Vishwanath wrote:
> Hello,
> 
> I wanted to run a few tasks each time the IP address on my PC changed. The
> PC connects to the network using DHCP and runs ubuntu (LTS, 2.6.15-26). 
> 
> I noticed that there was a directory called /etc/network/if-up.d that had
> a couple of scripts in them. I was wondering if I could just leave my
> script in that directory and expect it to get executed everytime DHCP
> changes the machines IP?

I believe the answer is no. There is a way to handle it (a script that 
the daemon will run), but the details are specific to the DHCP client 
you are using. The most common ones are pump, dhcpcd, and dhclient, and 
I don't know which of them Ubuntu uses (Debian-Sid offers all 3, plus a 
few others, and even there, I don't know which is most commonly used). 
See which daemon your system runs and check its man page for the 
specifics of its config rules.

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-09-26 17:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-26 16:03 automating a script with dhcp address changes Karthik Vishwanath
2006-09-26 17:48 ` Ray Olszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).