From 9a029e0d3ffe5e8d2dfe301c7b076248d08f568d Mon Sep 17 00:00:00 2001 From: Jim Salter Date: Sun, 1 Mar 2015 19:37:54 -0500 Subject: [PATCH] removed monitor_version to avoid having to pull in LWP::Simple --- CHANGELIST | 3 +++ VERSION | 2 +- sanoid | 18 +----------------- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/CHANGELIST b/CHANGELIST index 87b7ab9..cf1223d 100644 --- a/CHANGELIST +++ b/CHANGELIST @@ -1,3 +1,6 @@ +1.0.13 removed monitor_version again - sorry for the feature instability, forgot I removed it in the first place because I didn't like pulling + in so many dependencies for such a trivial feature + 1.0.12 patched default sanoid.conf provided to set yearly_mon and yearly_mday correctly 1.0.11 patched bug in yearly snapshots - thank you @stevenolen for the bug report! diff --git a/VERSION b/VERSION index bb83058..2ac9634 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.12 +1.0.13 diff --git a/sanoid b/sanoid index fbc6620..b64c2ad 100755 --- a/sanoid +++ b/sanoid @@ -4,14 +4,13 @@ # from http://www.gnu.org/licenses/gpl-3.0.html on 2014-11-17. A copy should also be available in this # project's Git repository at https://github.com/jimsalterjrs/sanoid/blob/master/LICENSE. -my $version = '1.0.12'; +my $version = '1.0.13'; use strict; use Config::IniFiles; # read samba-style conf file use File::Path; # for rmtree command in use_prune use Data::Dumper; # debugging - print contents of hash use Time::Local; # to parse dates in reverse -use LWP::Simple; # for checking sanoid version against trunk my $pscmd = '/bin/ps'; @@ -44,9 +43,6 @@ if ($ARGV[0] eq '--verbose') { } elsif ($ARGV[0] eq '--version') { print "Sanoid version: $version\n"; exit 0; -} elsif ($ARGV[0] eq '--monitor-version') { - monitor_version(); - exit 0; } elsif ($ARGV[0] eq '--cron' || 1) { take_snapshots (@params); prune_snapshots (@params); @@ -59,18 +55,6 @@ exit 0; #################################################################################### #################################################################################### -sub monitor_version() { - my $trunkversion = get("https://raw.githubusercontent.com/jimsalterjrs/sanoid/master/VERSION"); - chomp $trunkversion; - if ($version eq $trunkversion) { - print "OK: local version $version matches trunk version $trunkversion\n"; - exit 0; - } else { - print "WARN: local version $version does not match trunk version $trunkversion\n"; - exit 1; - } -} - sub monitor_health() { my ($config, $snaps, $snapsbytype, $snapsbypath) = @_; my %pools;