NRPE 2.13 not working with Solaris 11
Rafael Ostertag
raos at opencsw.org
Wed Apr 30 14:08:01 CEST 2014
Hi Alex
On Wed, Apr 30, 2014 at 11:49:06AM +0200, Alexander Winkler wrote:
> Hello,
> I have been running an Solaris 11.1 System with your nrpe 2.12. This
> package was quite old from a stable branch.
> Today, I updated my stalbe mirror and there was an nrpe update 2.13. It
> works with every Solaris 10 system, but not with solaris 11:
>
> The service goes into maintenance:
> [ Apr 30 11:36:02 Executing start method
> ("/var/opt/csw/svc/method/svc-cswnrpe start"). ]
> /var/opt/csw/svc/method/svc-cswnrpe: line 44: syntax error at line 58: `('
> unexpected
> [ Apr 30 11:36:02 Method "start" exited with status 3. ]
>
> It seems like an scripting error, since nrpe seems to work:
Yes, nrpe works just fine.
I attached a patch. Copy it to the affected Sol11 machines and do
# patch -p0 < /path/to/patchfile
Essentially, the patch adds
unalias -a
to the top of /etc/opt/csw/init.d/cswnrpe.
> But i haven't been able to find the reason yet.
> Can anybody reproduce this problem?
The problem is, that in Sol11, /bin/sh is a link to ksh which by default
defines some aliases, and `stop' is one of them. The nrpe start script dies on
line 58, because a function is defined which is also called `stop'. So, when
the script is read, line 58 is expanded to 'kill -s STOP' which doesn't make
much sense in that context.
Let me know of the outcome.
cheers
rafi
>
> Best regards
> Alex
-------------- next part --------------
--- /etc/opt/csw/init.d/cswnrpe.ORIG Wed Apr 30 12:37:24 2014
+++ /etc/opt/csw/init.d/cswnrpe Wed Apr 30 12:37:45 2014
@@ -1,5 +1,7 @@
#!/sbin/sh
+unalias -a
+
BINDIR="/opt/csw/bin"
BINFILE="$BINDIR/nrpe"
More information about the users
mailing list