mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-22 08:58:47 +00:00
- 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)
This commit is contained in:
parent
6e32a33ccc
commit
4987b30a5d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=162192
@ -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:"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user