[Pkg-puppet-devel] Bug#476840: puppetmaster: Init script support for starting multiple mongrels not complete

Bart Cortooms bart at kumina.nl
Sat Apr 19 14:10:59 UTC 2008


Package: puppetmaster
Version: 0.24.4-4
Severity: normal
Tags: patch


The following completes support for starting multiple Puppetmasters with
/etc/init.d/puppetmaster:

--- debian/puppetmaster.init.old	2008-04-19 15:53:48.000000000 +0200
+++ debian/puppetmaster.init	2008-04-19 15:54:37.000000000 +0200
@@ -40,7 +40,7 @@
 	NUMSTART=0
 	while [ $NUMSTART -lt $PUPPETMASTERS ]; do 
 	    start-stop-daemon --start --quiet --pidfile=/var/run/puppet/$NAME-$PORT.pid \
-		--startas $DAEMON -- $DAEMON_OPTS --masterport=$PORT
+		--startas $DAEMON -- $DAEMON_OPTS --masterport=$PORT --pidfile=/var/run/puppet/$NAME-$PORT.pid
 	    let PORT=PORT+1 
 	    let NUMSTART=NUMSTART+1 
 	done
@@ -53,9 +53,12 @@
 stop_puppetmaster() {
     if [ "$SERVERTYPE" = "mongrel" ]
     then
-	for instance in $PUPPETMASTERS; do
-	    start-stop-daemon --stop --quiet --pidfile /var/run/puppet/$NAME-$instance.pid
-	    rm /var/run/puppet/$NAME-$instance.pid
+	NUMSTART=0
+	while [ $NUMSTART -lt $PUPPETMASTERS ]; do 
+	    start-stop-daemon --stop --quiet --pidfile /var/run/puppet/$NAME-$PORT.pid
+	    rm /var/run/puppet/$NAME-$PORT.pid
+	    let PORT=PORT+1 
+	    let NUMSTART=NUMSTART+1 
 	done
     else
 	start-stop-daemon --stop --quiet --pidfile /var/run/puppet/$NAME.pid


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.18-6-xen-vserver-amd64 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages puppetmaster depends on:
ii  facter                        1.3.8-1    a library for retrieving facts fro
ii  lsb-base                      3.1-24     Linux Standard Base 3.1 init scrip
ii  puppet                        0.24.4-4   centralised configuration manageme
ii  ruby                          4.2        An interpreter of object-oriented 

Versions of packages puppetmaster recommends:
ii  rails                         2.0.2-1.1  MVC ruby based framework geared fo
ii  rdoc                          4.2        Generate documentation from ruby s

-- no debconf information





More information about the Pkg-puppet-devel mailing list