projects
/
cumulus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lbs-util now supports reading encrypted segments (with lbs-filter-gpg).
[cumulus.git]
/
lbs-util
diff --git
a/lbs-util
b/lbs-util
index
37f5e9f
..
5a5ebf6
100755
(executable)
--- a/
lbs-util
+++ b/
lbs-util
@@
-7,9
+7,16
@@
# Available commands:
# --list-snapshots
# --list-segments
# Available commands:
# --list-snapshots
# --list-segments
+# --verify-snapshot <snapshot>
use strict;
use LBS qw(parse_headers);
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];
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") {
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";
my $snapshot = $store->load_snapshot($args[0]);
my %info = parse_headers($snapshot);
print "Root: $info{Root}\n";