[Pkg-puppet-devel] Bug#498284: patch to support the START variable from /etc/default/puppet

Rik Theys Rik.Theys at esat.kuleuven.be
Wed Jan 7 13:52:01 UTC 2009


Package: puppet
Version: 0.24.5-2
Followup-For: Bug #498284


Hi,

The version currently in testing still ignores the START variable from /etc/default/puppet.

The following patch adds support for this variable to /etc/init.d/puppet.

Regards,

Rik


-- System Information:
Debian Release: 5.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages puppet depends on:
ii  adduser                       3.110      add and remove users and groups
ii  facter                        1.5.1-0.1  a library for retrieving facts fro
ii  libopenssl-ruby               4.2        OpenSSL interface for Ruby
ii  libruby [libxmlrpc-ruby]      4.2        Libraries necessary to run Ruby 1.
ii  libshadow-ruby1.8             1.4.1-8    Interface of shadow password for R
ii  libxmlrpc-ruby                4.2        transitional dummy package
ii  lsb-base                      3.2-20     Linux Standard Base 3.2 init scrip
ii  ruby                          4.2        An interpreter of object-oriented 

Versions of packages puppet recommends:
ii  rdoc                          4.2        Generate documentation from ruby s

puppet suggests no packages.

-- no debconf information


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

-------------- next part --------------
--- puppet	2008-07-26 23:41:33.000000000 +0200
+++ puppet.new	2009-01-07 14:50:28.000000000 +0100
@@ -11,6 +11,7 @@
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 DAEMON=/usr/sbin/puppetd
 DAEMON_OPTS=""
+START=yes
 NAME=puppetd
 DESC="puppet configuration management tool"
 
@@ -20,6 +21,14 @@
 
 . /lib/lsb/init-functions
 
+is_true() {
+    if [ "x$1" = "xtrue" -o "x$1" = "xyes" -o "x$1" = "x0" ] ; then
+        return 0
+    else
+        return 1
+    fi
+}
+
 reload_puppet() {
 	start-stop-daemon --stop --quiet --signal HUP --pidfile /var/run/puppet/$NAME.pid
 }
@@ -42,9 +51,14 @@
 
 case "$1" in
     start)
-	log_begin_msg "Starting $DESC"
-	start_puppet
-	log_end_msg 0
+        if is_true "$START"
+        then
+            log_begin_msg "Starting $DESC"
+            start_puppet
+            log_end_msg 0
+        else
+            exit 0
+        fi
 	;;
     stop)
 	log_begin_msg "Stopping $DESC"


More information about the Pkg-puppet-devel mailing list