diff options
author | jmelo <jmelo@FreeBSD.org> | 2006-05-13 02:28:39 +0800 |
---|---|---|
committer | jmelo <jmelo@FreeBSD.org> | 2006-05-13 02:28:39 +0800 |
commit | 3c19c40e534bc2a66279e03e5de3640cc9660285 (patch) | |
tree | b82327b78c60ed7cc9bb5dabe5be8af66b3d206c /mail | |
parent | 6dc8a306e0c149a2a499ad1a6b0bfdfc36e4e306 (diff) | |
download | freebsd-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-deinstall | 6 | ||||
-rw-r--r-- | mail/mailman/pkg-install | 2 |
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 |