Skip to content

Commit

Permalink
(PUP-3632) Update initscripts for AIO pathing changes
Browse files Browse the repository at this point in the history
This commit updates the specified rundir for pidfiles in each of Puppet's
client and server initscripts. Rather than placing pidfiles in
/var/run/puppet, we now put them in /var/run/puppetlabs.
  • Loading branch information
whopper authored and joshcooper committed Feb 20, 2015
1 parent 599b028 commit 2b1daad
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion ext/debian/puppet.init
Expand Up @@ -14,7 +14,7 @@ DAEMON_OPTS=""
NAME="agent"
PROCNAME="puppet"
DESC="puppet agent"
PIDFILE="/var/run/puppet/${NAME}.pid"
PIDFILE="/var/run/puppetlabs/${NAME}.pid"

test -x $DAEMON || exit 0

Expand Down
10 changes: 5 additions & 5 deletions ext/debian/puppetmaster.init
Expand Up @@ -23,7 +23,7 @@ if [ ! -d /var/run/puppet ]; then
mkdir -p /var/run/puppet
fi

chown puppet:puppet /var/run/puppet
chown puppet:puppet /var/run/puppetlabs

mongrel_warning="The mongrel servertype is no longer built-in to Puppet. It
appears as though mongrel is being used, as the number of puppetmasters is
Expand All @@ -49,7 +49,7 @@ is_true() {

start_puppet_master() {
if is_true "$START" ; then
start-stop-daemon --start --quiet --pidfile /var/run/puppet/${NAME}.pid \
start-stop-daemon --start --quiet --pidfile /var/run/puppetlabs/${NAME}.pid \
--startas $DAEMON -- $NAME $DAEMON_OPTS --masterport=$PORT
else
echo ""
Expand All @@ -58,7 +58,7 @@ start_puppet_master() {
}

stop_puppet_master() {
start-stop-daemon --stop --retry TERM/10/KILL/5 --quiet --oknodo --pidfile /var/run/puppet/${NAME}.pid
start-stop-daemon --stop --retry TERM/10/KILL/5 --quiet --oknodo --pidfile /var/run/puppetlabs/${NAME}.pid
}

status_puppet_master() {
Expand Down Expand Up @@ -96,11 +96,11 @@ status_puppet_master() {
fi

if is_true "$START" ; then
status_of_proc -p "/var/run/puppet/${NAME}.pid" "${DAEMON}" "${NAME}"
status_of_proc -p "/var/run/puppetlabs/${NAME}.pid" "${DAEMON}" "${NAME}"
else
echo ""
echo "puppetmaster not configured to start"
status_of_proc -p "/var/run/puppet/${NAME}.pid" "${DAEMON}" "${NAME}"
status_of_proc -p "/var/run/puppetlabs/${NAME}.pid" "${DAEMON}" "${NAME}"
fi
}

Expand Down
2 changes: 1 addition & 1 deletion ext/gentoo/conf.d/puppet
@@ -1,5 +1,5 @@
# Location of PID files
PUPPET_PID_DIR="/var/run/puppet"
PUPPET_PID_DIR="/var/run/puppetlabs"

# You may specify other parameters to the puppet client here
#PUPPET_EXTRA_OPTS=""
2 changes: 1 addition & 1 deletion ext/gentoo/conf.d/puppetmaster
@@ -1,5 +1,5 @@
# Location of PID files
PUPPETMASTER_PID_DIR="/var/run/puppet"
PUPPETMASTER_PID_DIR="/var/run/puppetlabs"

# Location of the main manifest
#PUPPETMASTER_MANIFEST="/etc/puppet/manifests/site.pp"
Expand Down
2 changes: 1 addition & 1 deletion ext/redhat/client.init
Expand Up @@ -18,7 +18,7 @@ export PATH

[ -f /etc/sysconfig/puppet ] && . /etc/sysconfig/puppet
lockfile=${LOCKFILE-/var/lock/subsys/puppet}
pidfile=${PIDFILE-/var/run/puppet/agent.pid}
pidfile=${PIDFILE-/var/run/puppetlabs/agent.pid}
puppetd=${PUPPETD-/usr/bin/puppet}
RETVAL=0

Expand Down
2 changes: 1 addition & 1 deletion ext/redhat/server.init
Expand Up @@ -13,7 +13,7 @@ PATH=/usr/bin:/sbin:/bin:/usr/sbin
export PATH

lockfile=/var/lock/subsys/puppetmaster
pidfile=/var/run/puppet/master.pid
pidfile=/var/run/puppetlabs/master.pid

# Source function library.
. /etc/rc.d/init.d/functions
Expand Down
2 changes: 1 addition & 1 deletion ext/solaris/smf/svc-puppetd
Expand Up @@ -12,7 +12,7 @@ exec_prefix=/opt/csw
sysconfdir=/opt/csw/etc
sbindir=/opt/csw/sbin

pidfile=/var/lib/puppet/run/agent.pid
pidfile=/var/run/puppetlabs/agent.pid

case "$1" in
start)
Expand Down
2 changes: 1 addition & 1 deletion ext/solaris/smf/svc-puppetmasterd
Expand Up @@ -8,7 +8,7 @@ exec_prefix=/opt/csw
sysconfdir=/opt/csw/etc
sbindir=/opt/csw/sbin

pidfile=/var/lib/puppet/run/master.pid
pidfile=/var/run/puppetlabs/master.pid

case "$1" in
start)
Expand Down
2 changes: 1 addition & 1 deletion ext/suse/client.init
Expand Up @@ -34,7 +34,7 @@
[ -f /etc/rc.status ] && . /etc/rc.status
[ -f /etc/sysconfig/puppet ] && . /etc/sysconfig/puppet
lockfile=${LOCKFILE-/var/lock/subsys/puppet}
pidfile=${PIDFILE-/var/run/puppet/agent.pid}
pidfile=${PIDFILE-/var/run/puppetlabs/agent.pid}
puppetd=${PUPPETD-/usr/bin/puppet}
RETVAL=0

Expand Down
2 changes: 1 addition & 1 deletion ext/suse/server.init
Expand Up @@ -31,7 +31,7 @@
# rc_exit exit appropriate to overall rc status

lockfile=/var/lock/subsys/puppetmaster
pidfile=/var/run/puppet/master.pid
pidfile=/var/run/puppetlabs/master.pid

# Source function library.
[ -f /etc/rc.status ] && . /etc/rc.status
Expand Down

0 comments on commit 2b1daad

Please sign in to comment.