From e226750d72571842c5984d86b96c44774b712825 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Wed, 8 May 2019 20:28:35 +0200 Subject: [PATCH] Improve setup scripts. --- all_new_2018/borg.sh | 8 +++++--- buster/setup_scripts/setup_eeepc.sh | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/all_new_2018/borg.sh b/all_new_2018/borg.sh index 1be74bb..c518c8b 100755 --- a/all_new_2018/borg.sh +++ b/all_new_2018/borg.sh @@ -16,9 +16,11 @@ usage() { } read_pw() { - eval $(ssh-agent) - echo "ssh-add" - ssh-add + if [ "${#SSH_AGENT_PID}" -eq 0 ]; then + eval $(ssh-agent) + echo "ssh-add" + ssh-add + fi if [ "${#BORG_PASSPHRASE}" -eq 0 ]; then stty -echo printf "Borg passphrase: " diff --git a/buster/setup_scripts/setup_eeepc.sh b/buster/setup_scripts/setup_eeepc.sh index a7add59..c4c4025 100755 --- a/buster/setup_scripts/setup_eeepc.sh +++ b/buster/setup_scripts/setup_eeepc.sh @@ -61,6 +61,7 @@ if [ "${HOME_DIR_EXISTS}" -eq 0 ]; then printf "Secrets passphrase: " read secrets_pass stty echo + echo "" # newline so user knows their input return was accepted echo "${secrets_pass}" | pmount /dev/"${secrets_dev}" cp -a "${source_dir_secrets}" "${target_dir_secrets}" chown -R plom:plom "${target_dir_secrets}" -- 2.30.2