From c37f412797424993a2cce5b54b86cfb5da8d99ea Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 1 Jan 2023 14:35:48 -0500 Subject: [PATCH] spelling: errlevel Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- sanoid | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sanoid b/sanoid index 06712a4..81a7eac 100755 --- a/sanoid +++ b/sanoid @@ -130,7 +130,7 @@ sub monitor_snapshots { my ($config, $snaps, $snapsbytype, $snapsbypath) = @_; my %datestamp = get_date(); - my $errorlevel = 0; + my $errlevel = 0; my $msg; my @msgs; my @paths; @@ -169,7 +169,7 @@ sub monitor_snapshots { my $dispcrit = displaytime($crit); if ( $elapsed > $crit || $elapsed == -1) { if ($crit > 0) { - if (! $config{$section}{'monitor_dont_crit'}) { $errorlevel = 2; } + if (! $config{$section}{'monitor_dont_crit'}) { $errlevel = 2; } if ($elapsed == -1) { push @msgs, "CRIT: $path has no $type snapshots at all!"; } else { @@ -178,7 +178,7 @@ sub monitor_snapshots { } } elsif ($elapsed > $warn) { if ($warn > 0) { - if (! $config{$section}{'monitor_dont_warn'} && ($errorlevel < 2) ) { $errorlevel = 1; } + if (! $config{$section}{'monitor_dont_warn'} && ($errlevel < 2) ) { $errlevel = 1; } push @msgs, "WARN: $path newest $type snapshot is $dispelapsed old (should be < $dispwarn)"; } } else { @@ -196,7 +196,7 @@ sub monitor_snapshots { if ($msg eq '') { $msg = "OK: all monitored datasets \($paths\) have fresh snapshots"; } print "$msg\n"; - exit $errorlevel; + exit $errlevel; }