Re: Bit Twister: Is this the dhclient-exit-hooks you were talking about?
- From: Ohmster <nowayin@xxxxxxxx>
- Date: Sun, 24 Sep 2006 18:58:45 +0000 (UTC)
Bit Twister <BitTwister@xxxxxxxxxxxxxxxx> wrote in
news:slrneh95ko.co6.BitTwister@xxxxxxxxxxxxxxx:
Okay I am back to xnews, it is much easier for me to use than slrn.
#************* end /etc/dhclient-exit-hooks **************************
I want my hostname to be ohmster.com so will this script not allow me
to do that?
You change the script to do what you want it to do.
Where can I instert my wgets call to bring up my wgets text file
to update my domain IP addresses?
if [ $exit_status -eq 0 ] ; then
if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
[ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then
-------- Your code here. ------
fi
fi
Or new and improved
if [ $exit_status -eq 0 ] ; then
case $reason in
BOUND|RENEW|REBIND|REBOOT)
-------- Your code here. ------
esac
fi
Hey bit, I see what you are saying for me to insert my own code, like to
change my domain's IP addresses at the DNS server and to restart my
firewall, but what you show here would pretty much bypass everything you
have written about your gateway changes, your postfix updates, and your
firewall updating. Granted I do not use postfix or shorewall, so you are
saying to just use this tiny bit of script and then put whatever I want
in between the two lines? i.e.: This is the entire script?
---------------------------------------------------------------------
if [ $exit_status -eq 0 ] ; then
case $reason in
BOUND|RENEW|REBIND|REBOOT)
-------- Your code here. ------
esac
fi
---------------------------------------------------------------------
Just that little bit is all I need for an entire dhclient-exit-hooks
file? Are there any support files that are necessary to go with this such
as the /sbin/dhclient-script? This is the dhclient-script I have for
that:
#!/bin/bash
# dhclient-script for Linux. Dan Halbert, March, 1997.
# Updated for Linux 2.[12] by Brian J. Murrell, January 1999.
# No guarantees about this. I'm a novice at the details of Linux
# networking....
I have not script writing talent like you have. If I try to write my own
script using the piece of code that you gave me above between the lines,
will you help me to proof it to make sure it will work? What I need is
for the script to do is to update my domains on the DNS server with my
wgets and then restart my firewall. The firewall has to actually start
when a connection is made, and then restart if the connection has
changed. These two actions are separate and require different lines of
code, i.e.:
To start firewall initially:
sh /etc/firestarter/firestarter.sh start
To restart a running firewall:
/etc/init.d/firestarter restart
How do I make the script choose the correct action? When the computer
boots, I need the initial start line. When I get an IP address change,
then I need the restart line.
What is this script for, where did it come from?
That script used to change the ip address in /etc/hosts file
setting my ISP gateway in /network and changing values
in /etc/shorewall/params file.
The params file is read by the firewall manager shorewall.
Out of my head.
Holy crap, out of your head. You are a good man, Charlie Brown. :)
Thanks for all of the fantastic help bit.
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
.
- Follow-Ups:
- Re: Bit Twister: Is this the dhclient-exit-hooks you were talking about?
- From: Bit Twister
- Re: Bit Twister: Is this the dhclient-exit-hooks you were talking about?
- References:
- Prev by Date: Re: Bit Twister: Is this the dhclient-exit-hooks you were talking about?
- Next by Date: Re: Mission critical ...
- Previous by thread: Re: Bit Twister: Is this the dhclient-exit-hooks you were talking about?
- Next by thread: Re: Bit Twister: Is this the dhclient-exit-hooks you were talking about?
- Index(es):
Relevant Pages
|