From: Christian Heller Date: Wed, 8 May 2019 18:28:35 +0000 (+0200) Subject: Improve setup scripts. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/static/%7B%7Bprefix%7D%7D/tasks?a=commitdiff_plain;h=e226750d72571842c5984d86b96c44774b712825;p=config Improve setup scripts. --- 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}"