From da0814c60d50764ec2faf230e476114c19cedc22 Mon Sep 17 00:00:00 2001 From: rhatto Date: Mon, 9 Oct 2006 21:13:46 +0000 Subject: NewList update --- firma | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/firma b/firma index ffeec56..aa295db 100755 --- a/firma +++ b/firma @@ -870,6 +870,7 @@ function NewList { #------------------------------------------------------------- local -i return_code=0 + local answer if [ ! -d "$LIST_PATH" ]; then @@ -877,6 +878,7 @@ function NewList { if mkdir "$LIST_PATH"; then # || (echo "$(basename $0): error creating $LIST_PATH: installation aborted"; exit 1) echo "Creating list config file and will ask some questions." + # TODO: try to create $LIST_HOMEDIR read -rep " List keyring location: ("$LIST_PATH") " LIST_HOMEDIR LIST_HOMEDIR=${LIST_HOMEDIR:-"$LIST_PATH"} @@ -886,7 +888,10 @@ function NewList { read -rep " List description (optional): " DESCRIPTION read -resp " Passphrase to protect the list's secret key: " PASSPHRASE - # TODO: key specs (size, expiry date...) + # TODO: automatically create a passphrase + # TODO: key specs: size, expiry date... + # TODO: CheckValidEmail $LIST_ADDRESS... + # TODO: for admin in $LIST_ADMIN; do CheckValidEmail $admin... echo "Creating your config..." touch $LIST_CONFIG_FILE @@ -914,7 +919,20 @@ function NewList { EOF - # TODO: import admin pubkey and send list pubkey to admin + while true; do + read -rep " Send list public key to list admins? (Y/n) " answer + answer="`echo $answer | tr '[:lower:]' '[:upper:]'`" + if [ "$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 + chown -R $FIRMA_USER.$FIRMA_GROUP $LIST_HOMEDIR else -- cgit v1.2.3