[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-debian] Purge not working for monotone-server
From: |
Thomas Keller |
Subject: |
Re: [Monotone-debian] Purge not working for monotone-server |
Date: |
Mon, 07 Jun 2010 15:11:37 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.9) Gecko/20100317 SUSE/3.0.4-1.1.1 Lightning/1.0b2pre Thunderbird/3.0.4 |
Am 07.06.2010 15:04, schrieb Francis Russell:
> One of the Debian build checking tools spotted that monotone-server no
> longer deletes its key when purged. The script current just assumes that
> the filename is the same as the key id, but this is no longer the case,
> as 'mtn genkey' now also adds the hash to the filename.
>
> This seems to be a choice between deleting $MTN_KEY.* which seems
> dangerous, or trying to store the key's actual filename in a db which
> seems error prone especially considering this would only work for newly
> generated keys.
>
> Any thoughts?
You could try to determine if there is more than one key with the same
name, like this:
mtn ls keys | grep $MTN_KEY | cut -d " " -f1 | uniq
If there is only one, concatenate $MTN_KEY with the hash output from the
above command and remove the key file. If there is more than one, issue
a warning to the user that the key is not deleted because the correct
one could not be determined.
For future installations it might be a good idea to store the key ID
instead of the key's given name - then a rm -f $KEY_DIR/*.$KEY_ID should
be ok.
Thomas.
--
GPG-Key 0x160D1092 | address@hidden | http://thomaskeller.biz
Please note that according to the EU law on data retention, information
on every electronic information exchange might be retained for a period
of six months or longer: http://www.vorratsdatenspeicherung.de/?lang=en
signature.asc
Description: OpenPGP digital signature