autofs: Fix cache path when xdg runtime is not set
This commit is contained in:
parent
822e46c818
commit
f89672dd59
2 changed files with 15 additions and 0 deletions
|
@ -1,4 +1,11 @@
|
|||
if ($uid > 999 && "`/usr/bin/id -gn`" == "`/usr/bin/id -un`") then
|
||||
if ( ! ($?XDG_RUNTIME_DIR) ) then
|
||||
if ( -d "/run/user/${uid}" ) then
|
||||
setenv XDG_RUNTIME_DIR "/run/user/${uid}"
|
||||
else
|
||||
setenv XDG_RUNTIME_DIR "${HOME}"
|
||||
endif
|
||||
endif
|
||||
setenv XDG_CACHE_HOME "${XDG_RUNTIME_DIR}/.cache"
|
||||
if ( ! -d "${XDG_CACHE_HOME}" ) then
|
||||
install -d -m 0700 "${XDG_CACHE_HOME}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue