X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=lbs-util;fp=lbs-util;h=5a5ebf68a8f7e2c733893a3f2902c603709fc2c9;hb=ff0872f12968a00ea2e3d2b95c54f97d98b51585;hp=37f5e9fd8bf23052914d5f7fbaa4aa33dc9101dc;hpb=0921bf06a76f97b4e762ee86e01917581f6857bc;p=cumulus.git diff --git a/lbs-util b/lbs-util index 37f5e9f..5a5ebf6 100755 --- a/lbs-util +++ b/lbs-util @@ -7,9 +7,16 @@ # Available commands: # --list-snapshots # --list-segments +# --verify-snapshot use strict; use LBS qw(parse_headers); +use Term::ReadPassword; + +sub get_password { + return if exists $ENV{LBS_GPG_PASSPHRASE}; + $ENV{LBS_GPG_PASSPHRASE} = read_password('Passphrase: '); +} die "Too few arguments!\n" unless scalar(@ARGV) >= 2; die "Must specify a repository!\n" unless -d $ARGV[0]; @@ -27,6 +34,8 @@ if ($cmd eq "--list-snapshots") { print $_, "\n"; } } elsif ($cmd eq "--verify-snapshot") { + get_password(); + my $snapshot = $store->load_snapshot($args[0]); my %info = parse_headers($snapshot); print "Root: $info{Root}\n";