reload-cf-serverd fails if cf-serverd not running and /sbin not in PATH
This commit introduced the reload by service restart:
But apparently /sbin is not in the PATH for (at least our) SLES systems.
Policy update process was stopped due to an error: ⇨ Policy update error for process '751' at 2017-12-05 14:29:33 ⇨ Exit code=-2147483648 for hook: '/opt/rudder/etc/hooks.d/policy-generation-finished/50-reload-policy-file-server'. stdout: /usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:. stderr: 'kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] /opt/rudder/bin/rudder-reload-cf-serverd: line 15: service: command not found
stdout currently shows
echo $PATH being executed, and that lacks /sbin, so I suggest to either extend the
PATH variable in the script or call it with full /sbin/service path...
#3 Updated by Benoît PECCATTE about 1 year ago
Almost all distribution have sbin in the PATH variable.
I tested on our sles 12 and it has /sbin in the PATH.
I don't think we should change this behaviour because service is not always in /sbin.
What is the rationale for not having /sbin in PATH for root ?
#11 Updated by Félix DALLIDET 9 months ago
- Status changed from In progress to Pending technical review
- Assignee changed from Félix DALLIDET to Benoît PECCATTE
- Pull Request set to https://github.com/Normation/rudder-agent/pull/171
#12 Updated by Félix DALLIDET 9 months ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder-agent|513b61083afb05d78a89bd8b480047ee4224318b.