Hi!,
> Hi guys. I would like to create a script that will do the following.
> Is this possible?
> 1. If it loses connectivity to the internet, I want the server to
> switch itself to DHCP client mode to obtain new lease, then have it
> set itself up statically with the new info. To do this , the server
> would have to change its eth0 configuration to dynamic setup, and run
> dhcpd client deamon to obtain new lease. Then , it would have to
> change the eth0 configuration again to set itself statically.
> 2. Modify my named.conf file to update itself to a new ip address (
> if the ip changes )
> Modify the zone files with the new ip address, and increase the
> serial. I know its a lot of work, but is this possible? anyone here
> attempted on doing this before?
One question would be why do this ?, why get an IP address dynamically and
then change your mode to static ?, why not just stick with the dynamic IP.
Surely, you should be able to write a small script which could then fetch the
IP address and update your DNS entry ?
BTW, a nsupdate command might be an easier way than playing with the zone file
and updating the serial number each time.
See ya
Dean Thompson
--
+____________________________+____________________________________________+
| Bach. Computing (Hons) | ICQ - 45191180 |
| PhD Student | Office - <Off-Campus> |
| School Comp.Sci & Soft.Eng | Phone - +61 3 9903 2787 (Gen. Office) |
| MONASH (Caulfield Campus) | Fax - +61 3 9903 1077 |
| Melbourne, Australia | |
+----------------------------+--------------------------------------------+