[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. puppet-0.24.5-rc3-1707-g8e37d21

Stig Sandbeck Mathisen ssm at debian.org
Sun Feb 14 14:39:23 UTC 2010


The following commit has been merged in the master branch:
commit 556d6b8d11a7d99c1cd912cc9ae8a10901040ef5
Author: Stig Sandbeck Mathisen <ssm at debian.org>
Date:   Sun Feb 14 15:31:17 2010 +0100

    Move postinst and postrm handling of shared users and directories to puppet-common

diff --git a/debian/puppet-common.postinst b/debian/puppet-common.postinst
new file mode 100644
index 0000000..d53600e
--- /dev/null
+++ b/debian/puppet-common.postinst
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "configure" ]; then
+
+	# Create the "puppet" user
+	if ! getent passwd puppet > /dev/null; then
+		adduser --quiet --system --group --home /var/lib/puppet  \
+			--gecos "Puppet configuration management daemon" \
+			puppet
+	fi
+
+	# Create folders common to "puppet" and "puppetmaster", which need
+	# to be owned by the "puppet" user
+	install --owner puppet --group puppet --directory \
+		/var/lib/puppet/state
+	
+	# Handle 
+	if [ -d /etc/puppet/ssl ] && [ ! -e /var/lib/puppet/ssl ] && grep -q 'ssldir=/var/lib/puppet/ssl' /etc/puppet/puppet.conf; then
+		mv /etc/puppet/ssl /var/lib/puppet/ssl
+	fi
+fi
+
+#DEBHELPER#
diff --git a/debian/puppet.postrm b/debian/puppet-common.postrm
similarity index 100%
rename from debian/puppet.postrm
rename to debian/puppet-common.postrm
diff --git a/debian/puppet.postinst b/debian/puppet.postinst
deleted file mode 100644
index e91a3ae..0000000
--- a/debian/puppet.postinst
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh -e
-
-if [ "$1" = "configure" ]; then
-	if ! getent passwd puppet > /dev/null; then
-		adduser --quiet --system --group --home /var/lib/puppet  \
-			--gecos "Puppet configuration management daemon" \
-			puppet
-	fi
-	if [ -d /etc/puppet/ssl ] && [ ! -e /var/lib/puppet/ssl ] && grep -q 'ssldir=/var/lib/puppet/ssl' /etc/puppet/puppet.conf; then
-		mv /etc/puppet/ssl /var/lib/puppet/ssl
-	fi
-fi
-
-#DEBHELPER#

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list