]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
clean /tmp if it is not on tmpfs
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 29 Mar 2012 07:04:31 +0000 (07:04 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Thu, 29 Mar 2012 07:04:31 +0000 (07:04 +0000)
svn-id: @12523

rc.d/rc.sysinit

index ac216d694adf89ca57b403bc2f1371c90952d34c..28da1a9428d7c1761ae91c3abf6da141c7aadcab 100755 (executable)
@@ -969,9 +969,8 @@ else
 fi
 
 # Clean /tmp
-if is_yes "$CLEAN_TMP"; then
-       # XXX LC_ALL needed here
-       rm -rf /tmp/* /tmp/.[a-zA-Z0-9]*
+if is_yes "$CLEAN_TMP" && ! is_fsmounted tmpfs /tmp; then
+       LC_ALL=C rm -rf /tmp/* /tmp/.[a-zA-Z0-9]*
 fi
 
 # System protected dirs
This page took 0.042885 seconds and 4 git commands to generate.