diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-10-04 15:08:06 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-10-04 15:08:06 -0400 |
commit | 9685060a9222ae5bdc242c6366f4a074e5ad8589 (patch) | |
tree | 4fde5c1088d69d177852e9964acb38d546144a17 /.config/login.d | |
parent | 4b151e74462b93b68ebbf90502de86b84917bd7c (diff) | |
parent | 795875623f9a9cd35374d2f0531182a267e81588 (diff) |
Merge branch 'master' into build64-par/master
# Conflicts:
# .config/emacs/init.el
Diffstat (limited to '.config/login.d')
-rw-r--r-- | .config/login.d/02_xdg_runtime_dir.sh | 2 | ||||
-rw-r--r-- | .config/login.d/90_dot-runtime.sh | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/.config/login.d/02_xdg_runtime_dir.sh b/.config/login.d/02_xdg_runtime_dir.sh index 864eadd..6db58af 100644 --- a/.config/login.d/02_xdg_runtime_dir.sh +++ b/.config/login.d/02_xdg_runtime_dir.sh @@ -1,7 +1,7 @@ #!/hint/sh # Set XDG_RUNTIME_DIR if we can -if [ -z "$XDG_RUNTIME_DIR" ] && shopt -q login_shell && type flock &>/dev/null; then +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 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 |