caudy at jhu
Nov 27, 2003, 8:13 AM
Post #2 of 4
So, we don't provide any solutions to this problem within Wackamole.=
execute a command after getting/loosing a IP-Address?
[In reply to]
However, I'm sure someone else has had to deal with it, and might ans=
you with something they've already developed. (This is a big holiday=
the US, which means a lot of people on the list probably won't be=
responding for a few days).
The solution you proposed is probably the quickest and dirtiest way t=
get what you want. If you wanted something more powerful, using the=
same mechanism to run a pair of shell-scripts "Acquire-script" and=
"Release-script" would give this to you. However, I'd be a little=
worried about doing so in a general situation, because of the privile=
with which Wackamole is run.
I wouldn't recommend adding anything too complicated directly to=20
Wackamole, because of timing concerns. You might consider a=20
long-running daemon to handle this failover, that communicates=20
(something along the lines of "Acquire/Release address") with Wackamo=
via named pipes or another Unix IPC mechanism.
Hops this helps,
Oliver F=E4nger wrote:
> Hi list,
> i've set up a round robin/failover scenario with squid.
> Wackamole works fine, but my problem is that, in my case,
> squid has to bind itself to a special address (not all 0.0.0.0).
> So i have to send a kill -HUP to the squid process, after getting a=
> IP address, because squid does not listen to this IP.
> The problem occurs with any other process, that binds to a special =
> and not
> to all.
> I've put a line in wackamole.c at the end of the Acquire function:
> system ("kill -HUP `cat /var/run/squid.pid >/dev/null 2>&1` >/dev/n=
> But I don't like this very dirty solution, so i wanted to ask,
> if there could be a better way to execute a command after
> acquiring/releasing an ip address.
> I can write the system stuff in c, but I would prefer a more=20
> configurable solution.
> Kind regards,
> Oliver F=E4nger
> wackamole-users mailing list
> wackamole-users [at] lists
Ryan W. Caudy
Center for Networking and Distributed Systems
Department of Computer Science
Johns Hopkins University