diff options
author | Torsten Blum <torstenb@FreeBSD.org> | 2000-02-13 20:17:43 +0000 |
---|---|---|
committer | Torsten Blum <torstenb@FreeBSD.org> | 2000-02-13 20:17:43 +0000 |
commit | 4d4e70850c641c41c3eb213c5497f6bef1c8b51d (patch) | |
tree | a599742daf5996caece6f7f9f3c2c89395afd992 /mail/postfix28/pkg-install | |
parent | 534aec00c51ba49847b1215433e0154b5c512aeb (diff) | |
download | ports-4d4e70850c641c41c3eb213c5497f6bef1c8b51d.tar.gz ports-4d4e70850c641c41c3eb213c5497f6bef1c8b51d.zip |
Notes
Diffstat (limited to 'mail/postfix28/pkg-install')
-rw-r--r-- | mail/postfix28/pkg-install | 77 |
1 files changed, 45 insertions, 32 deletions
diff --git a/mail/postfix28/pkg-install b/mail/postfix28/pkg-install index 7b4849639b05..4ed960fb5bdc 100644 --- a/mail/postfix28/pkg-install +++ b/mail/postfix28/pkg-install @@ -33,45 +33,58 @@ yesno() { done } -if pw groupshow "${group}" 2>/dev/null; then - echo "You already have a group \"${group}\", so I will use it." -else - echo "You need a group \"${group}\"." - if yesno "Would you like me to create it" y; then - pw groupadd ${group} -h - || exit - echo "Done." +if [ x"$2" = xPRE-INSTALL ]; then + if pw groupshow "${group}" 2>/dev/null; then + echo "You already have a group \"${group}\", so I will use it." else - echo "Please create it, and try again." - exit 1 + echo "You need a group \"${group}\"." + if yesno "Would you like me to create it" y; then + pw groupadd ${group} -h - || exit + echo "Done." + else + echo "Please create it, and try again." + exit 1 + fi fi -fi -if pw groupshow "${group2}" 2>/dev/null; then - echo "You already have a group \"${group2}\", so I will use it." -else - echo "You need a group \"${group2}\"." - if yesno "Would you like me to create it" y; then - pw groupadd ${group2} -h - || exit - echo "Done." + if pw groupshow "${group2}" 2>/dev/null; then + echo "You already have a group \"${group2}\", so I will use it." else - echo "Please create it, and try again." - exit 1 + echo "You need a group \"${group2}\"." + if yesno "Would you like me to create it" y; then + pw groupadd ${group2} -h - || exit + echo "Done." + else + echo "Please create it, and try again." + exit 1 + fi fi -fi -if pw user show "${user}" 2>/dev/null; then - echo "You already have a user \"${user}\", so I will use it." -else - echo "You need a user \"${user}\"." - if yesno "Would you like me to create it" y; then - pw useradd ${user} -g ${group} -h - -d /nonexistent \ - -s /nonexistent -c "Postfix Mail System" || exit - echo "Done." + if pw user show "${user}" 2>/dev/null; then + echo "You already have a user \"${user}\", so I will use it." else - echo "Please create it, and try again." - exit 1 + echo "You need a user \"${user}\"." + if yesno "Would you like me to create it" y; then + pw useradd ${user} -g ${group} -h - -d /nonexistent \ + -s /nonexistent -c "Postfix Mail System" || exit + echo "Done." + else + echo "Please create it, and try again." + exit 1 + fi fi + fi -chown root:maildrop ${PREFIX}/sbin/postdrop -chmod 2755 ${PREFIX}/sbin/postdrop +if [ x"$2" = xPOST-INSTALL ]; then + if [ ! -e ${PKG_PREFIX}/etc/postfix/main.cf ]; then + cp -p ${PKG_PREFIX}/etc/postfix/sample-main.cf \ + ${PKG_PREFIX}/etc/postfix/main.cf + fi + if [ ! -e ${PKG_PREFIX}/etc/postfix/master.cf ]; then + cp -p ${PKG_PREFIX}/etc/postfix/sample-master.cf \ + ${PKG_PREFIX}/etc/postfix/master.cf + fi + chown root:maildrop ${PKG_PREFIX}/sbin/postdrop + chmod 2755 ${PKG_PREFIX}/sbin/postdrop +fi |