On 25 September 2015 at 23:07, Matt Vander Werf <user-07704c41c3ad@xymon.invalid> wrote:
<bump>
Any response to this e-mail? Just wanted to make sure it wasn't missed....
In the mean time, here's a work-around you could use.
First create a script named /usr/local/bin/xymon-ntpdate:
#!/bin/sh
while [ "$2" ]; do shift; done
ntpdate -p 1 -u -q $1
Now, define NTPDATE=/usr/local/bin/xymon-ntpdate
This script simply throws away all of the switches, and only keeps the IP
address given by xymonnet, adding its own parameters as required.
You could probably squeeze this into NTPDATE definition, something like
this (untested):
NTPDATE="sh -c 'while [ .$1 != . ]; do shift; done; ntpdate -p 1 -u -q $1'"
I'd go with a separate script.
To be honest, I don't really know why the parameters were hard-coded into
xymonnet in the first place, and not defined in NTPDATE. Doing the latter
would make it much easier to tune for the environment or substitute a
different command with completely different parameters.
Cheers
Jeremy