[Xymon] function run_command in ../lib/run.c assumes sh but uses any $SHELL

Jeremy Laidman jlaidman at rebel-it.com.au
Fri Oct 17 06:43:31 CEST 2014


On 17 October 2014 15:16, Tracy Di Marco White <gendalia at iastate.edu> wrote:

> If I restart xymon while using tcsh, for example, suddenly my ntp test
> breaks,
>

Is this a client or server?  How did you restart xymon?  My init script has
"#! /bin/sh" in the first line, so I don't think it should matter what
shell I run it from.


> For the moment, I've hard coded 'export SHELL=/bin/sh' in the startup
> script for xymon, but the assumption shouldn't be made that $SHELL is a
> /bin/sh derivative.
>

Curiously, the code that runs the "ntpdate" command is this:

  execl("/bin/sh", "sh", "-c", cmd, NULL);

where "cmd" is the command (passed into the run_command() function.  So,
I'm perplexed why it should matter what shell is running.  As far as I can
tell, none of Xymon's binaries or scripts reference $SHELL.

Cheers
Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20141017/77a2329d/attachment.html>


More information about the Xymon mailing list