From 0dd9cc567196df837f0b43cda16ad810c823301a Mon Sep 17 00:00:00 2001 From: rhatto Date: Tue, 10 Oct 2006 03:53:59 +0000 Subject: NewList and SubscribeUsers minor fixes --- firma | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) (limited to 'firma') diff --git a/firma b/firma index 0a00530..07745f6 100755 --- a/firma +++ b/firma @@ -145,9 +145,10 @@ function DeclareGpgVars { # depends on function(s): none # returns: 0 #------------------------------------------------------------- - GPG_FLAGS="--no-options --no-default-keyring --homedir $LIST_HOMEDIR --quiet --no-tty --no-use-agent --no-permission-warning" - GPG="$GPG_BINARY $GPG_FLAGS --batch" - GPG_NOBATCH="$GPG_BINARY $GPG_FLAGS --no-batch" + GPG_FLAGS="--no-options --no-default-keyring --homedir $LIST_HOMEDIR --quiet --no-tty --batch --no-use-agent --no-permission-warning" + GPG_FLAGS_NO_BATCH="--no-options --no-default-keyring --homedir $LIST_HOMEDIR --quiet --no-batch --no-use-agent --no-permission-warning" + GPG="$GPG_BINARY $GPG_FLAGS" + GPG_NOBATCH="$GPG_BINARY $GPG_FLAGS_NO_BATCH" GPG_LIST_KEYS="$GPG --list-keys --with-colons" GPG_DECRYPT="$GPG --passphrase-fd 0 --decrypt" GPG_ENCRYPT="$GPG --armor --trust-model always --local-user $LIST_ADDRESS --passphrase-fd 0 --no-emit-version --sign --encrypt" @@ -1048,21 +1049,23 @@ EOF SubscribeUsers $method $LIST_ADMIN - break - elif [ "$answer" == "N" ] || [ "$answer" == "NO" ]; then - echo " Not sending public key from list to admins. Do it manually." - break - else - echo " Please answer either yes or no." - fi - done + # send list pubkey to admins + if [ "$?" == "0" ]; then + while true; do + read -rep " Send list public key to list admins? (Y/n) " answer + answer="`echo $answer | tr '[:lower:]' '[:upper:]'`" + if [ -z "$answer" ] || [ "$answer" == "Y" ] || [ "$answer" == "YES" ]; then + SendListPubkey $LIST_ADMIN + break + elif [ "$answer" == "N" ] || [ "$answer" == "NO" ]; then + echo " Not sending public key from list to admins. Do it manually." + break + else + echo " Please answer either yes or no." + fi + done + fi - # send list pubkey to admins - while true; do - read -rep " Send list public key to list admins? (Y/n) " answer - answer="`echo $answer | tr '[:lower:]' '[:upper:]'`" - if [ -z "$answer" ] || [ "$answer" == "Y" ] || [ "$answer" == "YES" ]; then - SendListPubkey $LIST_ADMIN break elif [ "$answer" == "N" ] || [ "$answer" == "NO" ]; then echo " Not sending public key from list to admins. Do it manually." -- cgit v1.2.3