NetBSD/share/sushi/system/mailerconf/script1

41 lines
689 B
Bash
Executable File

#!/bin/sh
# $NetBSD: script1,v 1.3 2004/03/09 21:36:37 garbled Exp $
BIGLIST="exim postfix-current sendmail88"
MAILERCONF="/etc/mailer.conf"
sendmail=0
grep sendmail/sendmail $MAILERCONF >/dev/null
if [ $? -eq 0 ]; then
grep "^#.*sendmail/sendmail" $MAILERCONF >/dev/null
if [ $? -ne 0 ]; then
sendmail=1
fi
fi
postfix=0
grep postfix/sendmail $MAILERCONF >/dev/null
if [ $? -eq 0 ]; then
grep "^#.*postfix/sendmail" $MAILERCONF >/dev/null
if [ $? -ne 0 ]; then
postfix=1
fi
fi
if [ $postfix -eq 1 ]; then
echo "postfix"
echo "sendmail"
else
echo "sendmail"
echo "postfix"
fi
for i in $BIGLIST
do
pkg_info -e $i >/dev/null
if [ "$?" = "0" ]; then
echo "$i"
fi
done