diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-10-04 15:04:21 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-10-04 15:04:21 -0400 |
commit | 1cdc7055122eae4a260b0f6f5aaa5522af145e43 (patch) | |
tree | c72729c9fc35af316c507893bb99762cb44355e6 /.config/login.d | |
parent | 9abaebb597d396a24c51f7c7c03e4145963f6bb1 (diff) |
Be more careful about what happens when XDG_RUNTIME_DIR isn't set.
Diffstat (limited to '.config/login.d')
-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 |