<div dir="ltr">Since I've been running bb/hobbit/xymon a very long time, upgrades don't touch my config files, I tend to go through them by hand. That one is the one line I missed, it looks like.<div><br></div><div>-Tracy</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 17, 2014 at 11:24 AM, J.C. Cleaver <span dir="ltr"><<a href="mailto:cleaver@terabithia.org" target="_blank">cleaver@terabithia.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
This is correct; there was change to do exactly this to allow alternative<br>
shells to be used directly (or not fork a shell at all if it wasn't<br>
needed).<br>
<br>
There *should* be a SHELL= line in xymonserver.cfg and xymonclient.cfg<br>
which is where this would be set -- by default to /bin/sh -- which would<br>
take effect for xymonlaunch-executed commands and their children<br>
(including ntpdate).<br>
<br>
Is there an .rpmnew or .pkg file that didn't get applied perhaps? How did<br>
the upgrade occur?<br>
<br>
<br>
Regards,<br>
<br>
-jc<br>
<div><div class="h5"><br>
<br>
<br>
On Fri, October 17, 2014 8:56 am, Tracy Di Marco White wrote:<br>
> I'm using xymon 4.3.17, and server is what does the ntpdate test. Here's<br>
> the snippet of code in question:<br>
>                 if (strchr(cmd, ' ') == NULL) execlp(cmd, cmd, NULL);<br>
>                 else {<br>
>                         char *shell = getenv("SHELL");<br>
>                         if (!shell) shell = "/bin/sh";<br>
>                         execl(shell, "sh", "-c", cmd, NULL);<br>
>                 }<br>
>                 exit(127);<br>
><br>
> Note that 4.3.10 does what you say. I have that in the clients I have.<br>
><br>
> If I restart it as me, ntpdate is run, but not with an sh derivative. My<br>
> shell is tcsh, and what I start uses my environment variables. My init<br>
> script also has #!/bin/sh as the first line, but that doesn't necessarily<br>
> prevent environment variables from being inherited.<br>
> # echo $tcsh<br>
> 6.18.01<br>
> # sh<br>
> # echo $SHELL<br>
> /bin/tcsh<br>
> I've added setting the shell to my startup script for now. And, to show<br>
> you<br>
> what's happening, here's a snippet that echoes $SHELL:<br>
> xymon_precmd()<br>
> {<br>
>         echo $SHELL<br>
>         SHELL="/bin/sh"<br>
>         export SHELL<br>
><br>
>         touch ${xymon_pidfile} && chown ${xymon_user} ${xymon_pidfile}<br>
> }<br>
><br>
> And so, even though the startup script is run with /bin/sh, the $SHELL<br>
> variable is still set to /bin/tcsh:<br>
> # /etc/rc.d/xymon restart<br>
> Stopping xymon.<br>
> Waiting for PIDS: 29042.<br>
> /bin/tcsh<br>
> Starting xymon.<br>
> #<br>
><br>
> -Tracy<br>
><br>
><br>
> On Thu, Oct 16, 2014 at 11:43 PM, Jeremy Laidman<br>
> <<a href="mailto:jlaidman@rebel-it.com.au">jlaidman@rebel-it.com.au</a>><br>
> wrote:<br>
><br>
>> On 17 October 2014 15:16, Tracy Di Marco White <<a href="mailto:gendalia@iastate.edu">gendalia@iastate.edu</a>><br>
>> wrote:<br>
>><br>
>>> If I restart xymon while using tcsh, for example, suddenly my ntp test<br>
>>> breaks,<br>
>>><br>
>><br>
>> Is this a client or server?  How did you restart xymon?  My init script<br>
>> has "#! /bin/sh" in the first line, so I don't think it should matter<br>
>> what<br>
>> shell I run it from.<br>
>><br>
>><br>
>>> For the moment, I've hard coded 'export SHELL=/bin/sh' in the startup<br>
>>> script for xymon, but the assumption shouldn't be made that $SHELL is a<br>
>>> /bin/sh derivative.<br>
>>><br>
>><br>
>> Curiously, the code that runs the "ntpdate" command is this:<br>
>><br>
>>   execl("/bin/sh", "sh", "-c", cmd, NULL);<br>
>><br>
>> where "cmd" is the command (passed into the run_command() function.  So,<br>
>> I'm perplexed why it should matter what shell is running.  As far as I<br>
>> can<br>
>> tell, none of Xymon's binaries or scripts reference $SHELL.<br>
>><br>
>> Cheers<br>
>> Jeremy<br>
>><br>
>><br>
</div></div>> _______________________________________________<br>
> Xymon mailing list<br>
> <a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
> <a href="http://lists.xymon.com/mailman/listinfo/xymon" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
><br>
<br>
<br>
</blockquote></div><br></div>