From: Mark Huang Date: Thu, 18 May 2006 17:34:10 +0000 (+0000) Subject: - can't figure out how to parse escaped colons in gpg --with-colons X-Git-Tag: myplc-0_4-rc1~35 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=c397708d9e9a3a2dbb80856630ace4da0af85e7a;p=myplc.git - can't figure out how to parse escaped colons in gpg --with-colons output. sigh. just blindly add the uid when updating, gpg will detect 2+ duplicates and it doesn't really matter anyway. --- diff --git a/plc.d/gpg b/plc.d/gpg index 00b37bb..48c643e 100755 --- a/plc.d/gpg +++ b/plc.d/gpg @@ -7,7 +7,7 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: gpg,v 1.4 2006/05/17 20:47:59 mlhuang Exp $ +# $Id: gpg,v 1.5 2006/05/17 22:52:09 mlhuang Exp $ # # Source function library and configuration @@ -58,8 +58,6 @@ EOF while read -a fields ; do if [ "${fields[0]}" = "pub" ] ; then fingerprint=${fields[4]} - IFS=$OLDIFS - comment=${fields[9]/\x3a/:} break fi done < <( @@ -69,18 +67,16 @@ EOF ) IFS=$OLDIFS - # Add a new UID if appropriate - if [ "$comment" != "$PLC_NAME Central (http://$PLC_WWW_HOST/) <$PLC_MAIL_SUPPORT_ADDRESS>" ] ; then - gpg --homedir=/etc/planetlab --no-permission-warning --no-tty --yes \ - --command-fd 0 --status-fd 1 --edit-key $fingerprint <