add PROMPT respect in get_gpg_expiration
authorJameson Graef Rollins <jrollins@finestructure.net>
Thu, 19 Feb 2009 07:05:05 +0000 (02:05 -0500)
committerJameson Graef Rollins <jrollins@finestructure.net>
Thu, 19 Feb 2009 07:05:05 +0000 (02:05 -0500)
src/share/common

index d185fddf70cf142aab145ec2e7013eef2fd66b44..31f8ddd08a0cbba9f633be7576a24c836a9e58c5 100644 (file)
@@ -291,7 +291,7 @@ get_gpg_expiration() {
 
     keyExpire="$1"
 
-    if [ -z "$keyExpire" ]; then
+    if [ -z "$keyExpire" -a "$PROMPT" = 'true' ]; then
        cat >&2 <<EOF
 Please specify how long the key should be valid.
          0 = key does not expire