From 5f243adc1b82fb81a976f14c7ba95867879da1f9 Mon Sep 17 00:00:00 2001 From: rhatto Date: Fri, 13 Jul 2007 22:22:23 +0000 Subject: small fixes --- firma | 58 +++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 23 deletions(-) (limited to 'firma') diff --git a/firma b/firma index 9ff8dda..13f1d11 100755 --- a/firma +++ b/firma @@ -1018,21 +1018,38 @@ function NewList { echo -e "KEY_SIZE='$KEY_SIZE'\nKEY_DESCRIPTION='$KEY_DESCRIPTION'" >> $LIST_CONFIG_FILE echo "Now generating your keyring..." - $GPG --gen-key <&2 "subscribe: cant add subscribers from $1: no such file or directory" - return_code=1 + if [[ -n "$2" ]]; then + if [[ -f "$2" ]]; then + $GPG --import < $2 + return_code=$? + if [[ "$return_code" == "0" ]]; then + AdminLog "subscription: success" fi else - echo >&2 "subscribe: missing parameters: subscribe file requires a file name" + echo >&2 "subscribe: cant add subscribers from $1: no such file or directory" return_code=1 fi else - AdminLog "subscribe: file option only valid in the interactive (command-line) mode" + echo >&2 "subscribe: missing parameters: subscribe file requires a file name" return_code=1 fi elif [[ "$1" == "keyserver" ]]; then -- cgit v1.2.3