From 92914027fb962f19e8331bb36e43f0847973c76f Mon Sep 17 00:00:00 2001 From: "xiongdian.me" Date: Mon, 30 Jan 2023 19:46:27 +0800 Subject: [PATCH] bug fix (Mon Jan 30 19:46:27 CST 2023) --- tools/sagent.sh | 2 +- tools/test.zsh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/sagent.sh b/tools/sagent.sh index ba129d7..dd524bf 100755 --- a/tools/sagent.sh +++ b/tools/sagent.sh @@ -67,7 +67,7 @@ all() touch $agent_file chmod 600 $agent_file fi - if ! ps -p "$SSH_AGENT_PID" > /dev/null; then + if ! ps -p "$SSH_AGENT_PID" 1>/dev/null 2>&1; then kill_agent fmt_note "launching a new agent" create_agent | tee $agent_file diff --git a/tools/test.zsh b/tools/test.zsh index d787329..cbd75b7 100644 --- a/tools/test.zsh +++ b/tools/test.zsh @@ -35,6 +35,7 @@ test $(DFS_QUIET=1 tools/common.sh ask_for_Yn "test") = "1" alias p114 which riot sagent +test -f "/tmp/piv-agent-$(whoami)" gbes || which gbes # check update