summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/rc.d/tmp4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/rc.d/tmp b/etc/rc.d/tmp
index 9750b6e2d06b..296eb45819b2 100644
--- a/etc/rc.d/tmp
+++ b/etc/rc.d/tmp
@@ -49,8 +49,8 @@ case "${tmpmfs}" in
[Nn][Oo])
;;
*)
- if /bin/mkdir -p /tmp/.diskless 2> /dev/null; then
- rmdir /tmp/.diskless
+ if _tmpdir=$(mktemp -d -q /tmp/.diskless.XXXXXX); then
+ rmdir ${_tmpdir}
else
if [ -h /tmp ]; then
echo "*** /tmp is a symlink to a non-writable area!"