From 1cdc7055122eae4a260b0f6f5aaa5522af145e43 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 4 Oct 2015 15:04:21 -0400 Subject: Be more careful about what happens when XDG_RUNTIME_DIR isn't set. --- .config/login.d/90_dot-runtime.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to '.config/login.d/90_dot-runtime.sh') 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 -- cgit v1.2.3