| Summary: | /usr/local/etc.rc.d/nslcd status returns 0 even when service is not running | ||
|---|---|---|---|
| Product: | Ports & Packages | Reporter: | takeda |
| Component: | Individual Port(s) | Assignee: | freebsd-ports-bugs (Nobody) <ports-bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Latest | ||
| Hardware: | Any | ||
| OS: | Any | ||
Please close this bug, I opened http://www.freebsd.org/cgi/query-pr.cgi?pr=187073 which properly tags which port it is regarding. State Changed From-To: open->closed Closed at submitter's request. |
/usr/local/etc.rc.d/nslcd status always returns 0 this in turn fools programs like (salt in my case) to think that the service is running while it is not. Fix: The least invasive way is to basically add "return 1" when service is not running, like this: nslcd_status() { nslcd_findpid if [ ! ${mypid} = '' ]; then echo "${name} is running with PID ${mypid}."; else echo "${name} not running?"; return 1 fi } How-To-Repeat: root@salt-testing:~ # /usr/local/etc/rc.d/nslcd status nslcd is running with PID 67408. root@salt-testing:~ # echo $? 0 root@salt-testing:~ # /usr/local/etc/rc.d/nslcd stop Stopping nslcd. Waiting for PIDS: 67408. root@salt-testing:~ # /usr/local/etc/rc.d/nslcd status nslcd not running? root@salt-testing:~ # echo $? 0