diff options
author | Luke Shumaker <shumakl@purdue.edu> | 2015-09-24 15:56:22 -0400 |
---|---|---|
committer | Luke Shumaker <shumakl@purdue.edu> | 2015-09-24 15:56:22 -0400 |
commit | 1f657262cae273a20c104465697aa283ed77196b (patch) | |
tree | eee5182c976b939d8b22d13aaeb7e333bfb18c73 /.config/login.d/90_dot-runtime.sh | |
parent | 4d6eed98970b4241f95b70309926e46040ce1956 (diff) |
Be more careful about what happens when XDG_RUNTIME_DIR isn't set.
Diffstat (limited to '.config/login.d/90_dot-runtime.sh')
-rw-r--r-- | .config/login.d/90_dot-runtime.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/.config/login.d/90_dot-runtime.sh b/.config/login.d/90_dot-runtime.sh index d06568f..cb0b7f2 100644 --- a/.config/login.d/90_dot-runtime.sh +++ b/.config/login.d/90_dot-runtime.sh @@ -1,4 +1,8 @@ # This is really only needed for ssh ControlPath; as I don't have a # way to communicate XDG_RUNTIME_DIR to it otherwise. mkdir -p -- ~/.runtime -ln -sfT -- "$XDG_RUNTIME_DIR" ~/.runtime/"$HOSTNAME" +if [ -n "$XDG_RUNTIME_DIR" ]; then + ln -sfT -- "$XDG_RUNTIME_DIR" ~/.runtime/"$HOSTNAME" +else + ln -sfT -- /tmp ~/.runtime/"$HOSTNAME" +fi |