aboutsummaryrefslogtreecommitdiff
path: root/mail/popa3d/pkg-install
diff options
context:
space:
mode:
authorMichael Haro <mharo@FreeBSD.org>2000-04-01 03:39:48 +0000
committerMichael Haro <mharo@FreeBSD.org>2000-04-01 03:39:48 +0000
commit3acc3fb9e465b79dcf0e258e3ea9b08989cb2f27 (patch)
tree7f5865572b78d37c86f8c393f27a99856578541a /mail/popa3d/pkg-install
parent7142ea07fc396d6adab9f57f732c023fa3d2f79c (diff)
downloadports-3acc3fb9e465b79dcf0e258e3ea9b08989cb2f27.tar.gz
ports-3acc3fb9e465b79dcf0e258e3ea9b08989cb2f27.zip
Notes
Diffstat (limited to 'mail/popa3d/pkg-install')
-rw-r--r--mail/popa3d/pkg-install51
1 files changed, 21 insertions, 30 deletions
diff --git a/mail/popa3d/pkg-install b/mail/popa3d/pkg-install
index 7f90da837520..4f0e5c9c3ca2 100644
--- a/mail/popa3d/pkg-install
+++ b/mail/popa3d/pkg-install
@@ -1,39 +1,30 @@
-#!/bin/sh
+# $FreeBSD$
+#
-USER=popa3d
-UID=89
-GID=89
-GROUP=popa3d
-GECOS="popa3d"
-HOME=/nonexistent
-SHELL=/sbin/nologin
+if [ "$2" != "PRE-INSTALL" ]; then
+ exit 0
+fi
-case $2 in
- PRE-INSTALL)
- which -s pw || {
- cat << EOF
+PATH=/bin:/usr/bin
-I see that it is missing the "pw" utility. I need this utility.
-Please get it and install it, and try again.
+use_vipw () {
-EOF
- exit 1
- }
- pw groupshow $GROUP > /dev/null 2>&1 || {
- pw groupadd $GROUP -g $GID;
- }
+ cat << EOF
+
+You need an account "pop" to install this package.
+Please add it by hand (try "man vipw") and try again.
- pw usershow $USER > /dev/null 2>&1 || {
- pw useradd $USER -g $GROUP -u $UID -h - -d $HOME -s $SHELL -c "$GECOS";
- }
+An example passwd entry is:
+pop:*:68:6::0:0:Post Office Owner:/nonexistent:/nonexistent
- ;;
- POST-INSTALL)
+EOF
- ;;
- *)
- echo "usage: $0 <pkg-name> {PRE-INSTALL|POST-INSTALL}"
- exit 64
-esac
+}
+
+if ! id -u "pop" > /dev/null 2>&1; then
+ use_vipw
+ exit 1
+fi
exit 0
+