Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Unknown
-
Resolution: Fixed
-
Component/s: chef-client
-
Environment:
Redhat and all variants (CentOS, OEL)
Description
On line 21 of the chef-client init script for redhat variants, the path to chef-client as installed by gems is wrong.
It currently reads:
exec="/usr/bin/chef-client"
The correct path is:
exec="/usr/local/bin/chef-client"
Due to this, the daemon never attempts to start because of the test on line 35:
[ -x $exec ] || exit 5
But even with this corrected, the script still won't work without a few further changes.
Line 38 reads:
daemon chef-client -d -c "$config" -L "$logfile" -P "$pidfile" -i "$interval" -s "$splay" "$options"
This should be:
daemon $exec -d -c "$config" -L "$logfile" -P "$pidfile" -i "$interval" -s "$splay" "$options"
Line 47 reads:
killproc -p $pidfile chef-client
This should be:
killproc -p $pidfile $exec
Issue Links
- is duplicated by
-
COOK-1359
chef-client init script does not invoke "daemon" with full path
-
Patched in https://github.com/charlesjohnson/chef/tree/4d77b42f6e597070d7cf0dded56f4b078031dd4d