diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2013-08-07 18:57:57 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2013-08-07 18:57:57 +1200 |
commit | e6bd376bfe882c753c5ce806453d72190a40dbd4 (patch) | |
tree | cc97e99bb25d35640abd68337b8c6cd09ab23687 | |
parent | Move dir creation to beneath option parsing (diff) | |
download | psshd-e6bd376bfe882c753c5ce806453d72190a40dbd4.tar.gz psshd-e6bd376bfe882c753c5ce806453d72190a40dbd4.zip |
Check return value of lockdir creation
-rwxr-xr-x | psshd | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -58,7 +58,10 @@ fi # Set up a PID dir dir="${TMPDIR:-/tmp}/psshd-${UID}" -mkdir -p "$dir" +if ! mkdir -p "$dir"; then + printf "Couldn't create directory ${dir} for PID file" >&2 + exit 1 +fi # Export the two settings autossh absolutely needs AUTOSSH_PIDFILE="${dir}/psshd-port-${port}.pid" |