Bug #1015
closed
smart proxy init script has hard coded ruby path
Added by Corey Osman almost 13 years ago.
Updated almost 3 years ago.
Description
Smart proxy should me the ruby path to a variable instead of hard coded path. Users of puppet enterprise might want to use /opt/puppet/bin/ruby instead of OS version of ruby and it would be easier to define a variable. Ultimately this variable should be in /etc/sysconfig/smar-proxy file as well.
cant we simply put a /usr/bin/env ruby in the shebang line?
on a second look, we already have the shabang line, so not really sure what this ticket is about...
start() {
echo -n $"Starting $prog: "
daemon --user ${FOREMAN_PROXY_USER} /usr/bin/ruby ${FOREMAN_PROXY_HOME}/bin/smart-proxy > /dev/null
You can't rely on /usr/bin/env ruby or the shebang to find the ruby version the user wants to use. The /usr/bin/env defaults to the order of the PATH statement so if multiple ruby versions exist (puppet enterprise case) than the /usr/bin/env will find the ruby in /usr/bin first.
I think the best way to handle this is to make /usr/bin/ruby a variable and source the variable in from /etc/sysconfig/foreman-proxy.
Foreman's init script suffers from this as well.
With the F17 RPM nighties, the foreman init script has the same ruby hardcoded path
- Status changed from New to Resolved
since the service was changed to systemd, it is no longer using hard coded ruby path.
- Category set to Packaging
- Status changed from Resolved to New
It still depends on the shebang line, and not all OSes use systemd units.
- Status changed from New to Rejected
Also available in: Atom
PDF