From 4ebdc9d1738ee7f9f5c0b3822e47bdab2bfa798f Mon Sep 17 00:00:00 2001 From: Christoph Klaffl Date: Thu, 13 Feb 2020 18:31:56 +0100 Subject: [PATCH] check for an invalid argument combination --- syncoid | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/syncoid b/syncoid index 2eef326..eddfec7 100755 --- a/syncoid +++ b/syncoid @@ -38,6 +38,16 @@ if (length $args{'sendoptions'}) { pod2usage(2); exit 127; } + + if (defined $args{'recursive'}) { + foreach my $option(@sendoptions) { + if ($option->{option} eq 'R') { + warn "invalid argument combination, zfs send -R and --recursive aren't compatible!"; + pod2usage(2); + exit 127; + } + } + } } my @recvoptions = ();