diff options
author | bms <bms@FreeBSD.org> | 2004-01-03 06:28:36 +0000 |
---|---|---|
committer | bms <bms@FreeBSD.org> | 2004-01-03 06:28:36 +0000 |
commit | 12c2bc5660f2be404a976f6ccd0c7e53e0c50a4c (patch) | |
tree | 8ab416a8111e5b2cf67793d42b0b615999f77e25 /net/nocatsplash/pkg-install | |
parent | fd963a5357d4de41c3f7b7f3197b0931bf6a856b (diff) | |
download | FreeBSD-ports-12c2bc5660f2be404a976f6ccd0c7e53e0c50a4c.zip FreeBSD-ports-12c2bc5660f2be404a976f6ccd0c7e53e0c50a4c.tar.gz |
Rename NoCatSplash to nocatsplash from rev 1.1.
Add IGNORE line for OSVERSION < 500000 due to security/pf dependency.
Requested by: kris
Diffstat (limited to 'net/nocatsplash/pkg-install')
-rw-r--r-- | net/nocatsplash/pkg-install | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/net/nocatsplash/pkg-install b/net/nocatsplash/pkg-install new file mode 100644 index 0000000..638abfc --- /dev/null +++ b/net/nocatsplash/pkg-install @@ -0,0 +1,36 @@ +#!/bin/sh + +PATH=/bin:/usr/sbin + +if [ -z "${WRAP_USER}" ]; then + WRAP_USER=nocat +fi + +case $2 in + PRE-INSTALL) + UID=181 + GID=${UID} + if [ ! -d "${NOCAT_DIR}" ]; then + mkdir -p ${NOCAT_DIR} + fi + if pw user show "${WRAP_USER}" 2>/dev/null; then + echo "You already have a user \"${WRAP_USER}\", so I will use it." + if pw usermod ${WRAP_USER} -d ${NOCAT_DIR} + then + echo "Changed home directory of \"${WRAP_USER}\" to \"${NOCAT_DIR}\"" + else + "${NOCAT_DIR}\" failed..." + exit 1 + fi + else + if pw useradd ${WRAP_USER} -u ${UID} \ + -d ${NOCAT_DIR} -s /sbin/nologin -c "NoCat Daemon" + then + echo "Added user \"${WRAP_USER}\"." + else + echo "Adding user \"${WRAP_USER}\" failed..." + exit 1 + fi + fi + ;; +esac |