From 6ded382a237450062457a7dff6c911694684b3d5 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Sat, 28 Mar 2015 07:45:45 -0400 Subject: [PATCH] Better display for 'bucardo list clones' Allow clone primes to specify multiple databases. --- bucardo | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/bucardo b/bucardo index 356e0a9e5..e6a4fd5a4 100755 --- a/bucardo +++ b/bucardo @@ -5320,9 +5320,11 @@ sub clone { ## Check for a prime if ($word =~ /(?i)prime(?-i)\w*\s*[:=]\s*(\w.*?)\s*$/) { $prime = $1; - ## This must be a valid database - if (! exists $DB->{$prime}) { - die qq{The prime option must specify a known database\n}; + for my $candidate (split /\s*,\s*/ => $prime) { + ## This must be a valid database + if (! exists $DB->{$candidate}) { + die qq{The prime option must specify a known database (not "$candidate")\n}; + } } $options .= "prime=$prime;"; next; @@ -6355,16 +6357,16 @@ sub list_clones { next if keys %$cloneids and ! exists $cloneids->{$clone->{id}}; print "Clone #$clone->{id}"; print " Status: $clone->{status}"; - defined $clone->{sync} and print " sync: $clone->{sync}"; - defined $clone->{dbgroup} and print " dbgroup: $clone->{dbgroup}"; - defined $clone->{relgroup} and print " relgroup: $clone->{relgroup}"; - defined $clone->{started} and print " started: $clone->{pstarted}"; - defined $clone->{ended} and print " ended: $clone->{pstarted}"; + defined $clone->{sync} and print " Sync: $clone->{sync}"; + defined $clone->{dbgroup} and print " Dbgroup: $clone->{dbgroup}"; + defined $clone->{relgroup} and print " Relgroup: $clone->{relgroup}"; + defined $clone->{started} and print " Started: $clone->{pstarted}"; + defined $clone->{ended} and print " Ended: $clone->{pstarted}"; if (defined $clone->{options}) { - print " $clone->{options}"; + print " $clone->{options}"; } ## Print last, on a new line: - defined $clone->{summary} and print "\n summary: $clone->{summary}"; + defined $clone->{summary} and print "\n Summary: $clone->{summary}"; print "\n"; } -- 2.39.5