mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 02:32:47 +00:00
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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=5407
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