7 # REQUIRE: mountcritremote tmp
13 rcvar=`set_rcvar clear_tmp`
15 start_cmd="${name}_start"
19 checkyesno clear_tmp_X || return
21 local x11_socket_dirs="/tmp/.X11-unix /tmp/.ICE-unix /tmp/.font-unix \
24 # Remove X lock files, since they will prevent you from restarting X.
25 rm -f /tmp/.X[0-9]-lock
27 # Create socket directories with correct permissions to avoid
30 rm -fr ${x11_socket_dirs}
31 mkdir -m 1777 ${x11_socket_dirs}
38 # Prune quickly with one rm, then use find to clean up
39 # /tmp/[lq]* (this is not needed with mfs /tmp, but
40 # doesn't hurt anything).
42 (cd /tmp && rm -rf [a-km-pr-zA-Z]* &&
43 find -x . ! -name . ! -name lost+found ! -name quota.user \
44 ! -name quota.group ! -name .X11-unix ! -name .ICE-unix \
45 ! -name .font-unix ! -name .XIM-unix \
46 -exec rm -rf -- {} \; -type d -prune)
51 # The clear_tmp_X variable should be tested even if clear_tmp_enable is NO
53 *start) cleartmp_prestart ;;