postinst is in puppet-common 3.4.3-1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | #!/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 \
--no-create-home \
--gecos "Puppet configuration management daemon" \
puppet
fi
# Create the "puppet" group, if it is missing, and set the
# primary group of the "puppet" user to this group.
if ! getent group puppet > /dev/null; then
addgroup --quiet --system puppet
usermod -g puppet puppet
fi
# Set correct permissions and ownership for puppet directories
if ! dpkg-statoverride --list /var/log/puppet >/dev/null 2>&1; then
dpkg-statoverride --update --add puppet puppet 0750 /var/log/puppet
fi
if ! dpkg-statoverride --list /var/lib/puppet >/dev/null 2>&1; then
dpkg-statoverride --update --add puppet puppet 0750 /var/lib/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
|