Hello.

I've got a problem with this port: I'm running it from a Nagios instance on another host (through NRPE3) and I need sudo to do this, as NRPE3 will run as user nagios.

Now:
_ running "/usr/local/libexec/nagios/check_ipmi_sensor" as root works;
_ running "/usr/local/bin/sudo /usr/local/libexec/nagios/check_ipmi_sensor" as user nagios works; _ running "/usr/local/libexec/nagios/check_nrpe3 -n -H xxx -c check_ipmi" (which runs the above command remotely) does not work.

I pinpointed it to this code:

sub get_sel{
        my @selcmd = @{(shift)};
        my $verbosity = shift;
        my $sel;
        if(-e '/usr/sbin/ipmi-sel'){
                $sel = '/usr/sbin/ipmi-sel';
        }
        else{
                chomp($sel = `which ipmi-sel`);
        }

Of course we don't have /usr/sbin/ipmi-sel, but /usr/local/sbin/ipmi-sel, so we end up in the else clause, but $sel is empty after this line if (and only if) this script is called from NRPE3.

I don't know PERL at all, so I solved by just hardcoding the correct path in my script.

This is just to let you know :)

 bye & Thanks
        av.
_______________________________________________
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to