From 6ba8b0298767b54fe144b78adfc2e4f43cbff580 Mon Sep 17 00:00:00 2001 From: rhatto Date: Tue, 2 Aug 2005 20:02:40 +0000 Subject: complementacao da funcao newlist, nova funcao gpg_args --- firma | 50 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 18 deletions(-) diff --git a/firma b/firma index 411a312..433d6c1 100755 --- a/firma +++ b/firma @@ -141,7 +141,7 @@ $(echo -e "$PASSWD\n${GPG_MESSAGE[@]}" | $GPGDECRYPT 2> /dev/null)" | sed -e 's/ } function message_list_return { -# send a bouce message +# send a bounce message # $1: sender email (usually $FROMADD) # sorry no identation :P echo " @@ -196,8 +196,6 @@ function newlist { mkdir "$CONFIG_PATH" # || (echo "error creating $CONFIG_PATH: installation aborted"; exit 1) echo "creating list config file and will ask some questions." - GPGDIR="$CONFIG_PATH" - read -p "path to nail command (eg, /usr/bin/nail): " MAIL read -p "path to gpg binary (eg, /usr/bin/gpg): " GPG @@ -207,7 +205,8 @@ function newlist { # todo: please no utf-8 (see DETAILS) read -p "list email (eg, firma@domain.tld): " LISTNAME - read -p "list admins emails (space delimited)" LISTADMIN + read -p "list admins emails (space delimited): " LISTADMIN + read -p "list description (fake?): " DESCRIPTION read -p "password for list keyring (use a huge one): " PASSWD # todo: key specs (size, expiry date...) @@ -217,13 +216,26 @@ function newlist { chown root.root $CONFIG chmod 600 $CONFIG if [ -f $CONFIG ]; then + gpg_args echo -e "MAIL=$MAIL\nGPG=$GPG\nGPGDIR=$GPGDIR\nLISTNAME=$LISTNAME\nLISTADMIN=$LISTADMIN\nPASSWD=$PASSWD" > $CONFIG echo "now generating your keyring..." - # re-eval GPGCOMMAND - # todo: GPGFLAGS depende de GPGDIR - GPGCOMMAND="$GPG $GPGFLAGS" - $GPGCOMMAND --gen-key - # ... + + $GPGCOMMAND --gen-key <