Project

General

Profile

Actions

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.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Packaging
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

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.

Actions #1

Updated by Ohad Levy almost 13 years ago

cant we simply put a /usr/bin/env ruby in the shebang line?

Actions #2

Updated by Ohad Levy over 12 years ago

on a second look, we already have the shabang line, so not really sure what this ticket is about...

Actions #3

Updated by Corey Osman over 12 years 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.

Actions #4

Updated by Benjamin Papillon almost 12 years ago

With the F17 RPM nighties, the foreman init script has the same ruby hardcoded path

Actions #5

Updated by Ohad Levy about 8 years ago

  • Status changed from New to Resolved

since the service was changed to systemd, it is no longer using hard coded ruby path.

Actions #6

Updated by Dominic Cleal about 8 years ago

  • Category set to Packaging
  • Status changed from Resolved to New

It still depends on the shebang line, and not all OSes use systemd units.

Actions #7

Updated by Ewoud Kohl van Wijngaarden almost 3 years ago

  • Status changed from New to Rejected

In 00073661ea5eecb3df6b8d54009f6898714b74f6 the init script was moved to the packaging repo. By now the classic init scripts have been dropped altogether and only systemd is supported (31393).

Actions

Also available in: Atom PDF