diff options
author | tonnerre <tonnerre> | 2008-03-13 14:17:05 +0000 |
---|---|---|
committer | tonnerre <tonnerre> | 2008-03-13 14:17:05 +0000 |
commit | 76c70da63cad2bb12d6765d4b551f5878e6e9385 (patch) | |
tree | 2c6913a3572d0b037ef719fab63842ac211224e5 /sysutils/puppet/files | |
parent | b25218c57fb480eecebe3a4b6a4778c1c896a735 (diff) | |
download | pkgsrc-76c70da63cad2bb12d6765d4b551f5878e6e9385.tar.gz |
Add Puppet version 0.22.4
Approved-by: jlam, gdt
Diffstat (limited to 'sysutils/puppet/files')
-rw-r--r-- | sysutils/puppet/files/puppetd.sh | 36 | ||||
-rw-r--r-- | sysutils/puppet/files/puppetmasterd.sh | 51 |
2 files changed, 87 insertions, 0 deletions
diff --git a/sysutils/puppet/files/puppetd.sh b/sysutils/puppet/files/puppetd.sh new file mode 100644 index 00000000000..aba642e6ffb --- /dev/null +++ b/sysutils/puppet/files/puppetd.sh @@ -0,0 +1,36 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: puppetd.sh,v 1.1.1.1 2008/03/13 14:17:05 tonnerre Exp $ +# +# PROVIDE: puppetd +# REQUIRE: DAEMON +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable puppetd: +# +# puppetd="YES" +# puppetd_confdir="@PREFIX@/etc/puppet" +# puppetd_pid="/var/run/${name}.pid" +# puppetd_flags="--confdir $puppetd_confdir --rundir /var/run" + +if [ -f /etc/rc.subr ]; then + . /etc/rc.subr +fi + +name="puppetd" +rcvar=$name +command="@PREFIX@/bin/${name}" +command_interpreter="@PREFIX@/bin/ruby18" +: ${puppetd_confdir="@PREFIX@/etc/puppet"} +: ${puppetd_pid="/var/run/${name}.pid"} +: ${puppetd_flags="--confdir $puppetd_confdir --rundir /var/run"} + +pidfile="$puppetd_pid" + +if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then + load_rc_config $name +elif [ -f /etc/rc.conf ]; then + . /etc/rc.conf +fi + +run_rc_command "$1" diff --git a/sysutils/puppet/files/puppetmasterd.sh b/sysutils/puppet/files/puppetmasterd.sh new file mode 100644 index 00000000000..38f096e5f72 --- /dev/null +++ b/sysutils/puppet/files/puppetmasterd.sh @@ -0,0 +1,51 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: puppetmasterd.sh,v 1.1.1.1 2008/03/13 14:17:05 tonnerre Exp $ +# +# PROVIDE: puppetmasterd +# REQUIRE: DAEMON +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable puppetmasterd: +# +# puppetmasterd="YES" +# puppetmasterd_confdir: Set to @PREFIX@/etc/puppet by default +# puppetmasterd_flags: Set to --confdir $puppetmasterd_confdir --rundir /var/run" by default +# + +if [ -f /etc/rc.subr ]; then + $_rc_subr_loaded . /etc/rc.subr +fi + +name="puppetmasterd" +rcvar=$name +command="@PREFIX@/bin/${name}" +command_interpreter="@PREFIX@/bin/ruby18" +start_precmd="puppetmasterd_checkconfig" +restart_precmd="puppetmasterd_checkconfig" +: ${puppetmasterd_confdir="@PREFIX@/etc/puppet"} +: ${puppetmasterd_pid="/var/run/${name}.pid"} +: ${puppetmasterd_flags="--confdir $puppetmasterd_confdir --rundir /var/run"} + +pidfile="$puppetmasterd_pid" + +puppetmasterd_checkconfig() { + echo -n "Performing sanity check of ${name} configuration: " + ${command} --parseonly ${puppetmasterd_flags} >/dev/null 2>&1 + rv=$? + if [ $rv != 0 ]; then + echo "FAILED, ${name} exited with status ${rv}" + ${command} --parseonly ${puppetmasterd_flags} + return 1 + else + echo "OK" + fi +} + +if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then + load_rc_config "$name" +elif [ -f /etc/rc.conf ]; then + . /etc/rc.conf +fi + +run_rc_command "$1" |