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