Removed daily rm'ing of files in /tmp, /var/tmp, and /scratch. There is no
safe way to do this, and envites very unpleasant results. Removed fsck'ing of all the disks on the system as it provides output that is almost always meaningless and only envites bug reports. Reviewed by: Jordan Hubbard
This commit is contained in:
parent
d5ca901589
commit
5b1ae1f88e
27
etc/daily
27
etc/daily
@ -9,29 +9,6 @@ bak=/var/backups
|
||||
|
||||
echo ""
|
||||
echo "Removing scratch and junk files:"
|
||||
if [ -d /tmp ]; then
|
||||
cd /tmp && {
|
||||
find . -type f -atime +3 -exec rm -f -- {} \;
|
||||
find . ! -name . -type d -mtime +1 -exec rmdir -- {} \; \
|
||||
>/dev/null 2>&1; }
|
||||
fi
|
||||
|
||||
if [ -d /var/tmp ]; then
|
||||
cd /var/tmp && {
|
||||
find . ! -name . -atime +7 -exec rm -f -- {} \;
|
||||
find . ! -name . -type d -mtime +1 -exec rmdir -- {} \; \
|
||||
>/dev/null 2>&1; }
|
||||
fi
|
||||
|
||||
if [ -d /scratch ]; then
|
||||
cd /scratch && {
|
||||
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
|
||||
|
||||
if [ -d /var/preserve ]; then
|
||||
cd /var/preserve && {
|
||||
find . ! -name . -mtime +7 -exec rm -f -- {} \; ; }
|
||||
@ -147,10 +124,6 @@ netstat -i
|
||||
echo ""
|
||||
ruptime
|
||||
|
||||
echo ""
|
||||
echo "Checking filesystems:"
|
||||
fsck -n | grep -v '^\*\* Phase'
|
||||
|
||||
echo ""
|
||||
if [ -f /etc/Distfile ]; then
|
||||
echo "Running rdist:"
|
||||
|
Loading…
Reference in New Issue
Block a user