Browse Source

handle portslock. reminded by antoine@

OPENBSD_4_8
espie 14 years ago
parent
commit
f953972807
1 changed files with 9 additions and 5 deletions
  1. +9
    -5
      src/etc/daily

+ 9
- 5
src/etc/daily View File

@ -1,5 +1,5 @@
#
# $OpenBSD: daily,v 1.66 2009/05/26 22:59:15 schwarze Exp $
# $OpenBSD: daily,v 1.67 2010/07/25 08:49:03 espie Exp $
# From: @(#)daily 8.2 (Berkeley) 1/25/94
#
# For local additions, create the file /etc/daily.local.
@ -48,19 +48,23 @@ next_part "Removing scratch and junk files:"
if [ -d /tmp -a ! -L /tmp ]; then
cd /tmp && {
find -x . \
\( -path './ssh-*' -o -path ./.X11-unix -o -path ./.ICE-unix \) \
\( -path './ssh-*' -o -path ./.X11-unix -o -path ./.ICE-unix \
-o -path ./portslocks \) \
-prune -o -type f -atime +3 -execdir rm -f -- {} \;
find -x . -type d -mtime +1 ! -path ./vi.recover ! -path ./.X11-unix \
! -path ./.ICE-unix ! -name . -execdir rmdir -- {} \; >/dev/null 2>&1; }
! -path ./.ICE-unix ! -path ./portslocks ! -name . \
-execdir rmdir -- {} \; >/dev/null 2>&1; }
fi
if [ -d /var/tmp -a ! -L /var/tmp ]; then
cd /var/tmp && {
find -x . \
\( -path './ssh-*' -o -path ./.X11-unix -o -path ./.ICE-unix \) \
\( -path './ssh-*' -o -path ./.X11-unix -o -path ./.ICE-unix \
-o -path ./portslocks \) \
-prune -o ! -type d -atime +7 -execdir rm -f -- {} \;
find -x . -type d -mtime +1 ! -path ./vi.recover ! -path ./.X11-unix \
! -path ./.ICE-unix ! -name . -execdir rmdir -- {} \; >/dev/null 2>&1; }
! -path ./.ICE-unix ! -path ./portslocks ! -name . \
-execdir rmdir -- {} \; >/dev/null 2>&1; }
fi
# Additional junk directory cleanup would go like this:


Loading…
Cancel
Save