summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatsuu Takuto <matsuu@gentoo.org>2009-09-04 16:07:26 +0000
committerMatsuu Takuto <matsuu@gentoo.org>2009-09-04 16:07:26 +0000
commit6d483da71bcfe97d0b545ea80f6e8c5559796a21 (patch)
treeb577b227a1962b75a7b6d14f61f1dea671d13f13 /app-admin/puppet/files
parentRemove old (diff)
downloadhistorical-6d483da71bcfe97d0b545ea80f6e8c5559796a21.tar.gz
historical-6d483da71bcfe97d0b545ea80f6e8c5559796a21.tar.bz2
historical-6d483da71bcfe97d0b545ea80f6e8c5559796a21.zip
Fixed init.d scripts for filepath issue.
Package-Manager: portage-2.1.6.13/cvs/Linux x86_64
Diffstat (limited to 'app-admin/puppet/files')
-rwxr-xr-xapp-admin/puppet/files/puppet-0.25.init40
-rwxr-xr-xapp-admin/puppet/files/puppetmaster-0.25.init40
2 files changed, 80 insertions, 0 deletions
diff --git a/app-admin/puppet/files/puppet-0.25.init b/app-admin/puppet/files/puppet-0.25.init
new file mode 100755
index 000000000000..2a11820351de
--- /dev/null
+++ b/app-admin/puppet/files/puppet-0.25.init
@@ -0,0 +1,40 @@
+#!/sbin/runscript
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount net
+ use dns logger puppetmaster netmount nfsmount
+}
+
+checkconfig() {
+ if [ ! -d "${PUPPET_PID_DIR}" ] ; then
+ eerror "Please make sure PUPPET_PID_DIR is defined and points to a existing directory"
+ return 1
+ fi
+
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ local options=""
+ [ -n "${PUPPET_EXTRA_OPTS}" ] && options="${options} ${PUPPET_EXTRA_OPTS}"
+
+ ebegin "Starting puppet"
+ start-stop-daemon --start --quiet \
+ --pidfile "${PUPPET_PID_DIR}/puppetd.pid" \
+ --exec /usr/sbin/puppetd -- ${options}
+ eend $? "Failed to start puppet"
+}
+
+stop() {
+ ebegin "Stopping puppet"
+ start-stop-daemon --stop --quiet \
+ --pidfile "${PUPPET_PID_DIR}/puppetd.pid"
+ local ret=$?
+ eend ${ret} "Failed to stop puppet"
+ rm -f "${PUPPET_PID_DIR}/puppetd.pid"
+ return ${ret}
+}
diff --git a/app-admin/puppet/files/puppetmaster-0.25.init b/app-admin/puppet/files/puppetmaster-0.25.init
new file mode 100755
index 000000000000..a543e99405a2
--- /dev/null
+++ b/app-admin/puppet/files/puppetmaster-0.25.init
@@ -0,0 +1,40 @@
+#!/sbin/runscript
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount net
+ use dns logger slapd netmount nfsmount
+}
+
+checkconfig() {
+ if [ ! -d "${PUPPETMASTER_PID_DIR}" ] ; then
+ eerror "Please make sure PUPPETMASTER_PID_DIR is defined and points to a existing directory"
+ return 1
+ fi
+
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ local options=""
+ [ -n "${PUPPETMASTER_EXTRA_OPTS}" ] && options="${options} ${PUPPETMASTER_EXTRA_OPTS}"
+
+ ebegin "Starting puppetmaster"
+ start-stop-daemon --start --quiet \
+ --pidfile "${PUPPETMASTER_PID_DIR}/puppetmasterd.pid" \
+ --exec /usr/sbin/puppetmasterd -- ${options}
+ eend $? "Failed to start puppetmaster"
+}
+
+stop() {
+ ebegin "Stopping puppetmaster"
+ start-stop-daemon --stop --quiet \
+ --pidfile "${PUPPETMASTER_PID_DIR}/puppetmasterd.pid"
+ local ret=$?
+ eend ${ret} "Failed to stop puppetmaster"
+ rm -f "${PUPPETMASTER_PID_DIR}/puppetmasterd.pid"
+ return ${ret}
+}