From 44ced8b3c5696795c613fa92770d6b9708ec7ed6 Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Thu, 10 May 2001 09:25:10 +0000 Subject: [PATCH] Delete everything that's not a directory in /var/run and /var/spool/lock at boot time. MFC after: 3 weeks --- etc/rc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/etc/rc b/etc/rc index 13ffc824bc2e..4d14157461a3 100644 --- a/etc/rc +++ b/etc/rc @@ -312,9 +312,12 @@ purgedir() { cd "$dir" && for file in .* * do [ ."$file" = .. -o ."$file" = ... ] && continue - [ -d "$file" -a ! -L "$file" ] && + if [ -d "$file" -a ! -L "$file" ] + then purgedir "$file" - [ -f "$file" -o -S "$file" ] && rm -f -- "$file" + else + rm -f -- "$file" + fi done ) done