aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.d/bootmisc.in8
1 files changed, 6 insertions, 2 deletions
diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in
index 9708a247..9a3b1fa1 100644
--- a/init.d/bootmisc.in
+++ b/init.d/bootmisc.in
@@ -35,6 +35,12 @@ cleanup_tmp_dir()
# Faster than find
rm -rf -- [^ajlq\.]*
+ # pam_mktemp creates a .private directory within which
+ # each user gets a private directory with immutable
+ # bit set; remove the immutable bit before trying to
+ # remove it.
+ [ -d /tmp/.private ] && chattr -R -a /tmp/.private
+
find $startopts ! -name . \
! -path "./lost+found" \
! -path "./lost+found/*" \
@@ -48,8 +54,6 @@ cleanup_tmp_dir()
! -path "./aquota.group/*" \
! -path "./journal" \
! -path "./journal/*" \
- ! -path "./.private" \
- ! -path "./.private/*" \
-exec rm -rf {} \;
eend 0
else