diff options
Diffstat (limited to 'sysutils/openvox-agent8/files')
-rw-r--r-- | sysutils/openvox-agent8/files/patch-lib_puppet_provider_service_daemontools.rb | 20 | ||||
-rw-r--r-- | sysutils/openvox-agent8/files/pkg-message.in | 11 | ||||
-rw-r--r-- | sysutils/openvox-agent8/files/puppet.in | 46 |
3 files changed, 77 insertions, 0 deletions
diff --git a/sysutils/openvox-agent8/files/patch-lib_puppet_provider_service_daemontools.rb b/sysutils/openvox-agent8/files/patch-lib_puppet_provider_service_daemontools.rb new file mode 100644 index 000000000000..ee90c96a89ab --- /dev/null +++ b/sysutils/openvox-agent8/files/patch-lib_puppet_provider_service_daemontools.rb @@ -0,0 +1,20 @@ +--- lib/puppet/provider/service/daemontools.rb.orig 2024-02-22 01:02:28 UTC ++++ lib/puppet/provider/service/daemontools.rb +@@ -41,7 +41,7 @@ Puppet::Type.type(:service).provide :daemontools, :par + + EOT + +- commands :svc => "/usr/bin/svc", :svstat => "/usr/bin/svstat" ++ commands :svc => "%%PREFIX%%/bin/svc", :svstat => "%%PREFIX%%/bin/svstat" + + class << self + attr_writer :defpath +@@ -88,7 +88,7 @@ Puppet::Type.type(:service).provide :daemontools, :par + # find the service dir on this node + def servicedir + unless @servicedir +- ["/service", "/etc/service", "/var/lib/svscan"].each do |path| ++ ["/var/service", "/etc/service", "/var/lib/svscan"].each do |path| + if Puppet::FileSystem.exist?(path) + @servicedir = path + break diff --git a/sysutils/openvox-agent8/files/pkg-message.in b/sysutils/openvox-agent8/files/pkg-message.in new file mode 100644 index 000000000000..caa220715594 --- /dev/null +++ b/sysutils/openvox-agent8/files/pkg-message.in @@ -0,0 +1,11 @@ +[ +{ type: install + message: <<EOM +To enable the puppet agent, add the following to /etc/rc.conf: + + puppet_enable="YES" + +The default PID directory is /var/run/puppet +EOM +} +] diff --git a/sysutils/openvox-agent8/files/puppet.in b/sysutils/openvox-agent8/files/puppet.in new file mode 100644 index 000000000000..fbdfef003ed5 --- /dev/null +++ b/sysutils/openvox-agent8/files/puppet.in @@ -0,0 +1,46 @@ +#!/bin/sh + +# PROVIDE: puppet +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable the puppet agent: +# +# puppet_enable="YES" + +. /etc/rc.subr + +name="puppet" +rcvar=puppet_enable + +load_rc_config "$name" + +: ${puppet_enable="NO"} +: ${puppet_rundir="/var/run/puppet"} + +command="%%PREFIX%%/bin/puppet" +command_args="agent ${puppet_flags} --rundir=${puppet_rundir}" +command_interpreter=%%RUBY%% +unset puppet_flags + +pidfile="${puppet_rundir}/agent.pid" +start_precmd="install -d -o puppet -g puppet ${pidfile%/*}" + +PATH="${PATH}:%%PREFIX%%/bin:%%PREFIX%%/sbin" + +# An UTF-8 locale is required +: LC_ALL=${LC_ALL:=C.UTF-8} +case $LC_ALL in + *.UTF-8) + ;; + *.*) + LC_ALL="${LC_ALL%.*}.UTF-8" + ;; + *) + LC_ALL=C.UTF-8 + ;; +esac +export LC_ALL + +run_rc_command "$1" |