From b2cc99b0fb69bf3ff50331c56233cab100df52e1 Mon Sep 17 00:00:00 2001 From: Axel Burri Date: Sun, 25 Jun 2017 18:06:06 +0200 Subject: [PATCH] btrbk: bugfix: accept "no" for "transaction_log", "transaction_syslog" and "lockfile" configuration options --- ChangeLog | 2 ++ btrbk | 6 +++--- doc/btrbk.conf.5 | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5644c4c..3369370 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/btrbk b/btrbk index 338bd19..4adbc38 100755 --- a/btrbk +++ b/btrbk @@ -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 }, diff --git a/doc/btrbk.conf.5 b/doc/btrbk.conf.5 index f54154b..096682e 100644 --- a/doc/btrbk.conf.5 +++ b/doc/btrbk.conf.5 @@ -72,7 +72,7 @@ allowed. .RE .SH OPTIONS .PP -\fBtransaction_log\fR +\fBtransaction_log\fR |no .RS 4 If set, all transactions (snapshot create, subvolume send\-receive, subvolume delete) as well as abort messages are logged to , 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 +\fBtransaction_syslog\fR |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 +\fBlockfile\fR |no .RS 4 Create lockfile on startup; checks lockfile before running any btrfs commands (using perl "flock"), and exits if the lock is held by