Skip to content

Commit

Permalink
(#2208) FreeBSD: call /usr/local/bin/ruby explicitly
Browse files Browse the repository at this point in the history
On FreeBSD systems, the Ruby interpreter is normally installed in
/usr/local/bin, which is not on the default PATH when running init
scripts.  Most users will have it in their PATH when logged in, which
causes concat to fail when run from init (or "service puppet start")
but not when run from directly the command line ("sudo puppet agent").
This follows the same strategy as OpenBSD, but avoid specifying the
Ruby interpreter version explicitly, because FreeBSD supports three
different versions of Ruby (with the default always being installed as
/usr/local/bin/ruby).
  • Loading branch information
gwollman committed Jul 10, 2015
1 parent adb17a4 commit 839de04
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions manifests/setup.pp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
$script_command = $::osfamily? {
'windows' => "ruby.exe '${script_path}'",
'openbsd' => "/usr/local/bin/ruby21 '${script_path}'",
'freebsd' => "/usr/local/bin/ruby '${script_path}'",
default => $script_path
}

Expand Down

0 comments on commit 839de04

Please sign in to comment.