diff options
Diffstat (limited to 'chat/ircd-hybrid/INSTALL')
-rw-r--r-- | chat/ircd-hybrid/INSTALL | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/chat/ircd-hybrid/INSTALL b/chat/ircd-hybrid/INSTALL new file mode 100644 index 00000000000..53a5e5ffeaf --- /dev/null +++ b/chat/ircd-hybrid/INSTALL @@ -0,0 +1,48 @@ +#!/bin/sh +# +# $NetBSD: INSTALL,v 1.1 2001/10/31 20:06:32 zuntum Exp $ + +PKGNAME=$1 +STAGE=$2 + +USER=@USER@ +GROUP=@GROUP@ +ADDUSER=@ADDUSER@ +ADDGROUP=@ADDGROUP@ +CHGRP="@CHGRP@" +ID="@ID@" +RM="@RM@" +TOUCH="@TOUCH@" + +case ${STAGE} in +PRE-INSTALL) + ${TOUCH} "/tmp/grouptestirc.$$" + ${CHGRP} ${GROUP} "/tmp/grouptestirc.$$" >/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/grouptestirc.$$" + + ${ID} ${USER} >/dev/null 2>&1 + if [ $? -eq 0 ]; then + echo "User '${USER}' already exists...proceeding." + else + echo "Creating '${USER}' user..." + ${ADDUSER} -c "IRC User" -g ${GROUP} -s /sbin/nologin ${USER} + echo "Done." + fi + ;; + +POST-INSTALL) + :;; + +*) + echo "Unexpected argument: ${STAGE}" + exit 1 + ;; +esac +exit 0 |