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

main
Sorin Ionescu 11 years ago
parent aefdce3fc3
commit 57b283facd

@ -12,7 +12,7 @@ fi
# Set the default paths to gpg-agent files. # Set the default paths to gpg-agent files.
_gpg_agent_conf="$HOME/.gnupg/gpg-agent.conf" _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. # Start gpg-agent if not started.
if ! ps -U "$USER" -o ucomm | grep -q gpg-agent; then if ! ps -U "$USER" -o ucomm | grep -q gpg-agent; then

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

@ -14,10 +14,10 @@ fi
_ssh_dir="$HOME/.ssh" _ssh_dir="$HOME/.ssh"
# Set the path to the environment file if not set by another module. # 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. # 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. # Start ssh-agent if not started.
if [[ ! -S "$SSH_AUTH_SOCK" ]]; then if [[ ! -S "$SSH_AUTH_SOCK" ]]; then

Loading…
Cancel
Save