diff options
author | zuntum <zuntum@pkgsrc.org> | 2001-11-01 00:57:41 +0000 |
---|---|---|
committer | zuntum <zuntum@pkgsrc.org> | 2001-11-01 00:57:41 +0000 |
commit | c72c1cf5f95cbe537b005028f1743cddb16ef203 (patch) | |
tree | 93b6296152ccfbaa88b43de043b2d69ce6e63fc5 /mail/majordomo/INSTALL | |
parent | 37637e483f1bf6574e9306aebbd013bb63d888d6 (diff) | |
download | pkgsrc-c72c1cf5f95cbe537b005028f1743cddb16ef203.tar.gz |
Move pkg/ files into package's toplevel directory
Diffstat (limited to 'mail/majordomo/INSTALL')
-rw-r--r-- | mail/majordomo/INSTALL | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/mail/majordomo/INSTALL b/mail/majordomo/INSTALL new file mode 100644 index 00000000000..f15618772ab --- /dev/null +++ b/mail/majordomo/INSTALL @@ -0,0 +1,51 @@ +#!/bin/sh +# +# $NetBSD: INSTALL,v 1.1 2001/11/01 01:00:27 zuntum Exp $ + +PKGNAME=$1 +STAGE=$2 + +HOME=@HOME@ +MAJORDOMO_USER=@MAJORDOMO_USER@ +MAJORDOMO_GROUP=@MAJORDOMO_GROUP@ +ADDUSER=@ADDUSER@ +ADDGROUP=@ADDGROUP@ +CHGRP=@CHGRP@ +ID=@ID@ +TOUCH=@TOUCH@ +RM=@RM@ + +if [ "$STAGE" != "PRE-INSTALL" ]; +then + exit 0 +fi + +# We need to check that ${MAJORDOMO_GROUP} exists before adding the user. +# +${TOUCH} "/tmp/grouptestmajordomo.$$" +${CHGRP} ${MAJORDOMO_GROUP} "/tmp/grouptestmajordomo.$$" >/dev/null 2>&1 +if [ $? -eq 0 ]; then + echo "Group '${MAJORDOMO_GROUP}' already exists...proceeding." +else + echo "Creating '${MAJORDOMO_GROUP}' group..." + ${ADDGROUP} ${MAJORDOMO_GROUP} + echo "Done." +fi +${RM} -f "/tmp/grouptestmajordomo.$$" + +${ID} ${MAJORDOMO_USER} >/dev/null 2>&1 +if [ $? -eq 0 ]; then + echo "User '${MAJORDOMO_USER}' already exists...proceeding." +else + echo "Creating '${MAJORDOMO_USER}' user..." + ${ADDUSER} -c "Majordomo User" -g ${MAJORDOMO_GROUP} \ + -b ${HOME} ${MAJORDOMO_USER} + echo "Done." +fi + +# Home... in case the login exists but not the home directory +# +install -d -m 775 -o ${MAJORDOMO_USER} -g ${MAJORDOMO_GROUP} ${HOME}/${MAJORDOMO_USER} +install -d -m 775 -o ${MAJORDOMO_USER} -g ${MAJORDOMO_GROUP} ${HOME}/${MAJORDOMO_USER}/archives +install -d -m 775 -o ${MAJORDOMO_USER} -g ${MAJORDOMO_GROUP} ${HOME}/${MAJORDOMO_USER}/digests +install -d -m 775 -o ${MAJORDOMO_USER} -g ${MAJORDOMO_GROUP} ${HOME}/${MAJORDOMO_USER}/lists |