Browse Source

[Fix #514] Use /tmp when $TMPDIR is undefined

master
Sorin Ionescu 11 years ago
parent
commit
57b283facd
  1. 2
      modules/gpg/init.zsh
  2. 2
      modules/pacman/functions/pacman-list-disowned
  3. 4
      modules/ssh/init.zsh

2
modules/gpg/init.zsh

@ -12,7 +12,7 @@ fi @@ -12,7 +12,7 @@ fi
# Set the default paths to gpg-agent files.
_gpg_agent_conf="$HOME/.gnupg/gpg-agent.conf"
_gpg_agent_env="$TMPDIR/gpg-agent.env"
_gpg_agent_env="${TMPDIR:-/tmp}/gpg-agent.env"
# Start gpg-agent if not started.
if ! ps -U "$USER" -o ucomm | grep -q gpg-agent; then

2
modules/pacman/functions/pacman-list-disowned

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
local tmp="$TMPDIR/pacman-disowned-$UID-$$"
local tmp="${TMPDIR:-/tmp}/pacman-disowned-$UID-$$"
local db="$tmp/db"
local fs="$tmp/fs"

4
modules/ssh/init.zsh

@ -14,10 +14,10 @@ fi @@ -14,10 +14,10 @@ fi
_ssh_dir="$HOME/.ssh"
# Set the path to the environment file if not set by another module.
_ssh_agent_env="${_ssh_agent_env:-$TMPDIR/ssh-agent.env}"
_ssh_agent_env="${_ssh_agent_env:-${TMPDIR:-/tmp}/ssh-agent.env}"
# Set the path to the persistent authentication socket.
_ssh_agent_sock="$TMPDIR/ssh-agent.sock"
_ssh_agent_sock="${TMPDIR:-/tmp}/ssh-agent.sock"
# Start ssh-agent if not started.
if [[ ! -S "$SSH_AUTH_SOCK" ]]; then

Loading…
Cancel
Save