summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sysutils/puppet-devel/Makefile6
-rw-r--r--sysutils/puppet-devel/files/pkg-deinstall.in13
-rw-r--r--sysutils/puppet-devel/files/pkg-install.in14
-rw-r--r--sysutils/puppet-devel/files/pkg-message.in5
-rw-r--r--sysutils/puppet-devel/pkg-plist1
5 files changed, 33 insertions, 6 deletions
diff --git a/sysutils/puppet-devel/Makefile b/sysutils/puppet-devel/Makefile
index c7ceb1106f98..0a719b92e62a 100644
--- a/sysutils/puppet-devel/Makefile
+++ b/sysutils/puppet-devel/Makefile
@@ -28,10 +28,12 @@ DOCS= CHANGELOG README LICENSE COPYING
PUPPET_USER:= puppet
PUPPET_GROUP:= ${PUPPET_USER}
PUPPET_RUNDIR:= /var/run/${PORTNAME}
-SUB_FILES+= pkg-install pkg-message
+PUPPET_WORKDIR:= /var/${PORTNAME}
+SUB_FILES+= pkg-install pkg-message pkg-deinstall
SUB_LIST+= PUPPET_RUNDIR="${PUPPET_RUNDIR}" \
PUPPET_USER="${PUPPET_USER}" \
- PUPPET_GROUP="${PUPPET_GROUP}"
+ PUPPET_GROUP="${PUPPET_GROUP}" \
+ PUPPET_WORKDIR="${PUPPET_WORKDIR}"
.include <bsd.port.pre.mk>
diff --git a/sysutils/puppet-devel/files/pkg-deinstall.in b/sysutils/puppet-devel/files/pkg-deinstall.in
new file mode 100644
index 000000000000..415066ce8a94
--- /dev/null
+++ b/sysutils/puppet-devel/files/pkg-deinstall.in
@@ -0,0 +1,13 @@
+#!/bin/sh
+# $FreeBSD: /tmp/pcvs/ports/sysutils/puppet-devel/files/Attic/pkg-deinstall.in,v 1.1 2008-09-04 19:08:58 beech Exp $
+PATH="/bin:/sbin:/usr/bin:/usr/sbin"
+
+RUNDIR=%%PUPPET_RUNDIR%%
+WORKDIR=%%PUPPET_WORKDIR%%
+
+if [ "$2" = "POST-DEINSTALL" ]; then
+ echo "=> Deleting ${RUNDIR} if empty..."
+ rm -d ${RUNDIR} 2>/dev/null || true
+ echo "=> Deleting ${WORKDIR} if empty..."
+ rm -d ${WORKDIR} 2>/dev/null || true
+fi
diff --git a/sysutils/puppet-devel/files/pkg-install.in b/sysutils/puppet-devel/files/pkg-install.in
index 9abe03a0e148..08e41588ae0f 100644
--- a/sysutils/puppet-devel/files/pkg-install.in
+++ b/sysutils/puppet-devel/files/pkg-install.in
@@ -8,6 +8,7 @@ UID=814
GID=$UID
RUNDIR=%%PUPPET_RUNDIR%%
+WORKDIR=%%PUPPET_WORKDIR%%
PW="pw"
CHOWN="chown"
@@ -36,7 +37,18 @@ if [ "$2" = "PRE-INSTALL" ]; then
fi
elif [ "$2" = "POST-INSTALL" ]; then
- ${INSTALL_DIR} ${RUNDIR}
+ if [ -d ${RUNDIR} ]; then
+ echo "=> ${RUNDIR} already exists."
+ else
+ echo -n "=> Creating RUNDIR ${RUNDIR}... "
+ ${INSTALL_DIR} ${RUNDIR} || echo "failed"
+ fi
+ if [ -d ${WORKDIR} ]; then
+ echo "=> ${WORKDIR} already exists."
+ else
+ echo -n "=> Creating WORKDIR ${WORKDIR}... "
+ ${INSTALL_DIR} ${WORKDIR} || echo "failed"
+ fi
fi
exit 0
diff --git a/sysutils/puppet-devel/files/pkg-message.in b/sysutils/puppet-devel/files/pkg-message.in
index 6f90cbeecc9e..2fa9f3421251 100644
--- a/sysutils/puppet-devel/files/pkg-message.in
+++ b/sysutils/puppet-devel/files/pkg-message.in
@@ -1,3 +1,4 @@
+
To enable puppetd and/or puppetmasterd, add:
puppetd_enable="YES"
@@ -5,7 +6,7 @@ puppetmasterd_enable="YES"
to /etc/rc.conf
-Indivisual config files such as %%PREFIX%%/etc/puppetmasterd.conf are
-deprecated. Use a single file, %%PREFIX%%/puppet/puppet.conf.
+Individual config files such as %%PREFIX%%/etc/puppet/puppetmasterd.conf are
+deprecated. Use a single file, %%PREFIX%%/etc/puppet/puppet.conf.
Now the default PID directory is %%PUPPET_RUNDIR%%.
diff --git a/sysutils/puppet-devel/pkg-plist b/sysutils/puppet-devel/pkg-plist
index 8751c5fdf14d..35eafc00a3be 100644
--- a/sysutils/puppet-devel/pkg-plist
+++ b/sysutils/puppet-devel/pkg-plist
@@ -11,4 +11,3 @@ etc/puppet/puppet.conf-dist
@dirrmtry etc/puppet/ssl
@dirrmtry etc/puppet/manifests
@dirrmtry etc/puppet
-@dirrmtry /var/run/puppet