diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 2001-10-17 14:00:24 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 2001-10-17 14:00:24 +0000 |
commit | b9d89fac0e3f53d4946ab94b90cff31da830dacc (patch) | |
tree | 1c2a0b2358a5b22e5fa0967db054af6ca6c7e1f2 /mail | |
parent | b5fc6c3a250d577f0c5a6539667b718c2bd19f52 (diff) | |
download | ports-b9d89fac0e3f53d4946ab94b90cff31da830dacc.tar.gz ports-b9d89fac0e3f53d4946ab94b90cff31da830dacc.zip |
Notes
Diffstat (limited to 'mail')
-rw-r--r-- | mail/popper/scripts/pre-install | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/mail/popper/scripts/pre-install b/mail/popper/scripts/pre-install index efea0df5b772..77e73a2b55b4 100644 --- a/mail/popper/scripts/pre-install +++ b/mail/popper/scripts/pre-install @@ -1,13 +1,29 @@ #!/bin/sh -if ! id -u pop > /dev/null 2>&1; then - echo "You need an account \"pop\" to install this package." - echo "Please add it by hand (try \"man vipw\") and try again." - echo "" - echo "An example passwd entry is:" - echo "pop:*:68:6::0:0:Post Office Owner:/nonexistent:/nonexistent" - echo "" - exit 1 +USER=pop +UID=68 +GID=6 +GROUP=mail + +if ! pw group show "${GROUP}" 2>/dev/null 1>&2; then + if pw groupadd ${GROUP} -g ${GID}; then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + exit 1 + fi fi + +if ! pw user show "${USER}" 2>/dev/null 1>&2; then + if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ + -s "/sbin/nologin" -d "/nonexistent" -c "Post Office Owner" + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + exit 1 + fi +fi + usrdir=${PREFIX}/etc/popper if [ ! -d $usrdir ]; then mkdir -p $usrdir |