Bug #1015
smart proxy init script has hard coded ruby path
| Status: | New | Start: | 06/29/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - | |||
| Backlog: | No | Difficulity: | ||
| Votes: | 0 |
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.
History
Updated by Ohad Levy over 1 year ago
on a second look, we already have the shabang line, so not really sure what this ticket is about...
Updated by Corey Osman over 1 year ago
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.
Updated by Benjamin Papillon 11 months ago
With the F17 RPM nighties, the foreman init script has the same ruby hardcoded path
