btrbk: bugfix: accept "no" for "transaction_log", "transaction_syslog" and "lockfile" configuration options

pull/164/head
Axel Burri 2017-06-25 18:06:06 +02:00
parent 315b3f24a1
commit b2cc99b0fb
3 changed files with 8 additions and 6 deletions

View File

@ -1,6 +1,8 @@
btrbk-current
* Add "stream_buffer" configuration option (close #154).
* Bugfix: accept "no" for "transaction_log", "transaction_syslog"
and "lockfile" configuration options.
btrbk-0.25.0

6
btrbk
View File

@ -107,9 +107,9 @@ my %config_options = (
ssh_cipher_spec => { default => "default", accept_regexp => qr/^$ssh_cipher_match(,$ssh_cipher_match)*$/ },
rate_limit => { default => undef, accept => [ "no" ], accept_regexp => qr/^[0-9]+[kmgtKMGT]?$/, require_bin => 'pv' },
stream_buffer => { default => undef, accept => [ "no" ], accept_regexp => qr/^[0-9]+[kmgKMG%]?$/ }, # NOTE: requires 'mbuffer' command on target
transaction_log => { default => undef, accept_file => { absolute => 1 } },
transaction_syslog => { default => undef, accept => \@syslog_facilities },
lockfile => { default => undef, accept_file => { absolute => 1 }, context => [ "root" ] },
transaction_log => { default => undef, accept => [ "no" ], accept_file => { absolute => 1 } },
transaction_syslog => { default => undef, accept => [ "no", @syslog_facilities ] },
lockfile => { default => undef, accept => [ "no" ], accept_file => { absolute => 1 }, context => [ "root" ] },
stream_compress => { default => undef, accept => [ "no", (keys %compression) ] },
stream_compress_level => { default => "default", accept => [ "default" ], accept_numeric => 1 },

View File

@ -72,7 +72,7 @@ allowed.
.RE
.SH OPTIONS
.PP
\fBtransaction_log\fR <file>
\fBtransaction_log\fR <file>|no
.RS 4
If set, all transactions (snapshot create, subvolume send\-receive,
subvolume delete) as well as abort messages are logged to <file>, in a
@ -80,7 +80,7 @@ space-separated table format: "localtime type status duration
target_url source_url parent_url message".
.RE
.PP
\fBtransaction_syslog\fR <facility>
\fBtransaction_syslog\fR <facility>|no
.RS 4
If set, all transactions (as described in \fItransaction_log\fR above)
are logged to syslog. The program name used in the messages is
@ -282,7 +282,7 @@ for remote sources, make sure that the "pv" command is available on
the source host.
.RE
.PP
\fBlockfile\fR <file>
\fBlockfile\fR <file>|no
.RS 4
Create lockfile <file> on startup; checks lockfile before running any
btrfs commands (using perl "flock"), and exits if the lock is held by