summaryrefslogtreecommitdiff
path: root/etc/daily
diff options
context:
space:
mode:
Diffstat (limited to 'etc/daily')
-rw-r--r--etc/daily25
1 files changed, 16 insertions, 9 deletions
diff --git a/etc/daily b/etc/daily
index c14b0eac9269..b30682500c91 100644
--- a/etc/daily
+++ b/etc/daily
@@ -25,8 +25,10 @@ fi
if [ -d /scratch ]; then
cd /scratch && {
- find . ! -name . -atime +1 -exec rm -f -- {} \;
- find . ! -name . -type d -mtime +1 -exec rmdir -- {} \; \
+ find . ! -name . ! -fstype local -a -prune -o \
+ -atime +1 -exec rm -f -- {} \;
+ find . ! -name . ! -fstype local -a -prune -o \
+ -type d -mtime +1 -exec rmdir -- {} \; \
>/dev/null 2>&1; }
fi
@@ -54,13 +56,18 @@ if [ -f /etc/news.expire ]; then
/etc/news.expire
fi
-#echo ""
-#echo "Purging accounting records:"
-#mv /var/account/acct.2 /var/account/acct.3
-#mv /var/account/acct.1 /var/account/acct.2
-#mv /var/account/acct.0 /var/account/acct.1
-#cp /var/account/acct /var/account/acct.0
-#sa -s > /dev/null
+if [ -d /var/account ] ; then
+ echo ""
+ echo "Purging accounting records:"
+ cd /var/account
+ if [ -f acct.2 ] ; then mv -f acct.2 acct.3 ; fi
+ if [ -f acct.1 ] ; then mv -f acct.1 acct.2 ; fi
+ if [ -f acct.0 ] ; then mv -f acct.0 acct.1 ; fi
+ if [ -f acct ] ; then
+ cp -pf acct acct.0
+ sa -s > /dev/null
+ fi
+fi
echo ""
echo "Backup passwd and group files:"