summaryrefslogtreecommitdiff
path: root/chat/gale/INSTALL
diff options
context:
space:
mode:
Diffstat (limited to 'chat/gale/INSTALL')
-rw-r--r--chat/gale/INSTALL75
1 files changed, 45 insertions, 30 deletions
diff --git a/chat/gale/INSTALL b/chat/gale/INSTALL
index b59b84e5475..b3ddb6eb715 100644
--- a/chat/gale/INSTALL
+++ b/chat/gale/INSTALL
@@ -1,6 +1,9 @@
#!/bin/sh
#
-# $NetBSD: INSTALL,v 1.1 2001/10/31 20:06:25 zuntum Exp $
+# $NetBSD: INSTALL,v 1.2 2001/11/19 04:58:59 lukem Exp $
+
+PKGNAME=$1
+STAGE=$2
USER=@GALE_USER@
GROUP=@GALE_GROUP@
@@ -12,34 +15,46 @@ ID="@ID@"
RM="@RM@"
TOUCH="@TOUCH@"
-# Group... the default's shipped with NetBSD
-# We need to check that ${GROUP} exists before adding the user.
-# Do it with chgrp to be able to use NIS.
-#
-${TOUCH} "/tmp/grouptest.$$"
-${CHGRP} ${GROUP} "/tmp/grouptest.$$" >/dev/null 2>&1
-if [ $? -eq 0 ]
-then
- echo "Group '${GROUP}' already exists...proceeding."
-else
- echo "Creating '${GROUP}' group..."
- ${ADDGROUP} ${GROUP}
- echo "Done."
-fi
-${RM} -f "/tmp/grouptest.$$"
+case ${STAGE} in
+PRE-INSTALL)
+ # Group... the default's shipped with NetBSD
+ # We need to check that ${GROUP} exists before adding the user.
+ # Do it with chgrp to be able to use NIS.
+ #
+ ${TOUCH} "/tmp/grouptest.$$"
+ ${CHGRP} ${GROUP} "/tmp/grouptest.$$" >/dev/null 2>&1
+ if [ $? -eq 0 ]
+ then
+ echo "Group '${GROUP}' already exists...proceeding."
+ else
+ echo "Creating '${GROUP}' group..."
+ ${ADDGROUP} ${GROUP}
+ echo "Done."
+ fi
+ ${RM} -f "/tmp/grouptest.$$"
-# Use `id' to be able to use NIS.
-#
-${ID} ${USER} 2>/dev/null >/dev/null
-if [ $? -eq 0 ]
-then
- echo "User '${USER}' already exists...proceeding."
-else
- echo "Creating '${USER}' user..."
- ${ADDUSER} \
- -c "Gale instant messaging system" \
- -d /var/${USER} \
- -g ${GROUP} -s /bin/sh -m ${USER}
- echo "Done."
-fi
+ # Use `id' to be able to use NIS.
+ #
+ ${ID} ${USER} 2>/dev/null >/dev/null
+ if [ $? -eq 0 ]
+ then
+ echo "User '${USER}' already exists...proceeding."
+ else
+ echo "Creating '${USER}' user..."
+ ${ADDUSER} \
+ -c "Gale instant messaging system" \
+ -d /var/${USER} \
+ -g ${GROUP} -s /bin/sh -m ${USER}
+ echo "Done."
+ fi
+ ;;
+
+POST-INSTALL)
+ ;;
+
+*)
+ echo "Unexpected argument: ${STAGE}"
+ exit 1
+ ;;
+esac
exit 0