b1f0282c6a
--HG-- extra : convert_revision : 5ecbdd2f519c0605978a7a2e3e503dae5bb7e99f
24 lines
558 B
Text
24 lines
558 B
Text
#
|
|
# This script creates the ntpd system user/group.
|
|
#
|
|
|
|
case "${ACTION}" in
|
|
pre)
|
|
;;
|
|
post)
|
|
echo "Running ${PKGNAME}-${VERSION} post installation hooks..."
|
|
if ! getent group ntpd >/dev/null; then
|
|
groupadd -r ntpd 2>&1 >/dev/null
|
|
[ $? -ne 0 ] && exit $?
|
|
echo "Created ntpd system group."
|
|
fi
|
|
if ! getent passwd ntpd >/dev/null; then
|
|
useradd -c "Network Time Protocol Daemon" \
|
|
-d /var/chroot/ntpd \
|
|
-s /sbin/nologin -g ntpd -r ntpd && \
|
|
passwd -l ntpd 2>&1 >/dev/null
|
|
[ $? -ne 0 ] && exit $?
|
|
echo "Created ntpd system user."
|
|
fi
|
|
;;
|
|
esac
|