when calling a script with pump.conf's script directive I never get a
useful IP as the third argument as per the man page.
It's always something like up eth1 0.0.0.0
I've managed to replicate this only by letting pump fail on eth1, in which case
it does exactly what you described. It shouldn't be running the script at all in
this case (which I've fixed), but I have a feeling you're seeing something else?
Is pump working otherwise? What script are you using? How do you know what the
parameters look like? Is the script actually being run properly? Does
/var/log/messages have anything useful in it? Does the script work properly on
eth0 (can you test that?).
For what it's worth, there seem to be pretty weird things going on with the
script on my system too (RH7.0, pump-0.8.3-2). With the following script:
# Script to modify /etc/hosts when pump gains a new IP address.
echo "pump-script running with arguments ($1) ($2) ($3)..." >/tmp/pumpscr.txt
if [ "$1" = up -a "$2" = eth0 -a "$3" != 0.0.0.0 ]; then
echo "pump-script doing its thing" >>/tmp/pumpscr.txt
( /bin/cp -fp /etc/hosts /etc/hosts.bak && \
echo "$3 `/bin/hostname -s` `/bin/hostname`" >/etc/hosts && \
/bin/grep -v "`/bin/hostname | sed 's/\./\\\./g'`" /etc/hosts.bak >>/etc/hosts
# Bring up the firewall.
/etc/sysconfig/network-scripts/firewall $2 $3
echo "pump-script failed with arguments ($1) ($2) ($3)" >>/tmp/pumpscr.txt
I get the "pump-script running" and "pump-script doing its thing" messages in
/tmp/pumpscr.txt, followed by "/bin/cp: write error: Bad file descriptor". And
if I change those "echo >/tmp/pumpscr.txt" lines to invocations of
/usr/bin/logger, nothing at all gets logged to syslog.
Anything else I can try?
My setup eth1 as an interface to a cable modem, so your fix addresses my bug
report. It is reporting the IP correctly now.
Hmm...upgrading to pump-0.8.4-1 and then downgrading back to 0.8.3-2 seems to
have fixed the above: no more "Bad file descriptor" errors, and logging to
syslog now seems to work fine.
Old, dead bug.