Delete everything that's not a directory in /var/run and /var/spool/lock
at boot time. MFC after: 3 weeks
This commit is contained in:
parent
af32b80c65
commit
44ced8b3c5
7
etc/rc
7
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
|
||||
|
Loading…
Reference in New Issue
Block a user