aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorjmelo <jmelo@FreeBSD.org>2006-05-13 02:28:39 +0800
committerjmelo <jmelo@FreeBSD.org>2006-05-13 02:28:39 +0800
commit3c19c40e534bc2a66279e03e5de3640cc9660285 (patch)
treeb82327b78c60ed7cc9bb5dabe5be8af66b3d206c /mail
parent6dc8a306e0c149a2a499ad1a6b0bfdfc36e4e306 (diff)
downloadfreebsd-ports-gnome-3c19c40e534bc2a66279e03e5de3640cc9660285.tar.gz
freebsd-ports-gnome-3c19c40e534bc2a66279e03e5de3640cc9660285.tar.zst
freebsd-ports-gnome-3c19c40e534bc2a66279e03e5de3640cc9660285.zip
- Add conditional in pkg-install/pkg-deinstall to check if the allow file in
cron dir already exists. Reported by: Steve Ames <steve@energistic.com> via email Approved by: mnag (mentor)
Diffstat (limited to 'mail')
-rw-r--r--mail/mailman/pkg-deinstall6
-rw-r--r--mail/mailman/pkg-install2
2 files changed, 6 insertions, 2 deletions
diff --git a/mail/mailman/pkg-deinstall b/mail/mailman/pkg-deinstall
index 93c125e19a01..05972ee6ebc5 100644
--- a/mail/mailman/pkg-deinstall
+++ b/mail/mailman/pkg-deinstall
@@ -13,8 +13,10 @@ DEINSTALL)
/usr/bin/diff - %%MAILMANDIR%%/cron/crontab.in >/dev/null 2>&1 ; then
echo "---> Zeroing crontab for \"%%USER%%\""
/usr/bin/crontab -u "%%USER%%" /dev/null
- grep -v %%USER%% /var/cron/allow > /var/cron/allow.new
- mv /var/cron/allow.new /var/cron/allow
+ if [ -e /var/cron/allow ]; then
+ grep -v %%USER%% /var/cron/allow > /var/cron/allow.new
+ mv /var/cron/allow.new /var/cron/allow
+ fi
else
echo "---> Crontab for \"%%USER%%\" not removed: please deinstall"
echo "---> manually if you no-longer wish to use Mailman. eg:"
diff --git a/mail/mailman/pkg-install b/mail/mailman/pkg-install
index 72dcae989707..2441fa532116 100644
--- a/mail/mailman/pkg-install
+++ b/mail/mailman/pkg-install
@@ -51,7 +51,9 @@ POST-INSTALL)
echo "---> Checking crontab(5) file for user \"%%USER%%\""
+ if [ -e /var/cron/allow ]; then
echo "%%USER%%" >> /var/cron/allow
+ fi
if /usr/bin/crontab -u "%%USER%%" -l >/tmp/mmctab$$ 2>&1 ; then
if test -s /tmp/mmctab$$; then