diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-12-06 23:46:26 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-12-06 23:46:26 -0500 |
commit | b407de3877656b18705c6272d07284821baa69f5 (patch) | |
tree | 457ce6388af783cc20061eef1581119e2c542b13 /.config/login.d | |
parent | 9685060a9222ae5bdc242c6366f4a074e5ad8589 (diff) | |
parent | f189b197d568df8555a7de1e08f7f05665f708ba (diff) |
Merge branch 'master' into build64-par/master
Diffstat (limited to '.config/login.d')
-rw-r--r-- | .config/login.d/02_xdg_runtime_dir.sh | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/.config/login.d/02_xdg_runtime_dir.sh b/.config/login.d/02_xdg_runtime_dir.sh index 6db58af..6e3e4ad 100644 --- a/.config/login.d/02_xdg_runtime_dir.sh +++ b/.config/login.d/02_xdg_runtime_dir.sh @@ -5,11 +5,11 @@ if [ -z "$XDG_RUNTIME_DIR" ] && type flock &>/dev/null; then _diy_xdg_runtime_login() { export XDG_RUNTIME_DIR="$XDG_CACHE_HOME/xdg-runtime-dir/$HOSTNAME" if ! [ /dev/fd/7 -ef "$XDG_CACHE_HOME/xdg-runtime-dir/.lock" ]; then + mkdir -p -- "$XDG_CACHE_HOME/xdg-runtime-dir" exec 7>"$XDG_CACHE_HOME/xdg-runtime-dir/.lock" if flock -xn 7; then if [ ! -d "$XDG_RUNTIME_DIR" ]; then local tmp="$(mktemp -d --tmpdir -- "${USER}@${HOSTNAME}-runtime.XXXXXXXXXX")" - mkdir -p -- "$XDG_CACHE_HOME/xdg-runtime-dir" ln -sfT -- "$tmp" "$XDG_RUNTIME_DIR" fi # Unfortunately this doesn't survive across exec(1). @@ -19,7 +19,6 @@ if [ -z "$XDG_RUNTIME_DIR" ] && type flock &>/dev/null; then fi } _diy_xdg_runtime_logout() { - exec 7>&- exec 7>"$XDG_CACHE_HOME/xdg-runtime-dir/.lock" if flock -xn 7; then rm -rf -- "$(readlink "$XDG_RUNTIME_DIR")" |