1 # arg 1: the new package version
4 # Check user/group cron exists
6 getent group cron > /dev/null || groupadd cron
7 getent passwd cron > /dev/null || useradd -c "Cron user" -g cron -s /bin/false -d /var/spool/cron/crontabs cron
10 echo "==> Moving crontabs:"
11 find /var/spool/cron/ -maxdepth 1 -type f \
12 -a ! -name "*.pacsave" \
13 -exec mv {} /var/spool/cron/crontabs \; -print
15 echo "==> Check /var/spool/cron for any crontabs that may"
16 echo "==> not have been correctly moved into the new"
17 echo "==> /var/spool/cron/crontabs"
19 chown cron:cron /var/spool/cron/crontabs/*
22 for i in crontabs tmp trigger; do
23 chown cron:cron /var/spool/cron/$i
24 chmod go-rwx /var/spool/cron/$i
30 chown cron:cron /var/spool/cron/crontabs/*
34 echo "==> Stopping services"
35 rm /var/service/{bcron-sched,bcron-spool,bcron-update} >& /dev/null
36 echo "==> Deleting cron user"
37 usr/sbin/userdel cron >& /dev/null
38 usr/sbin/groupdel cron >& /dev/null