From 5c5f6b66a0e2960dfee8d663fcd76cc3705350ad Mon Sep 17 00:00:00 2001 From: Mike Hibler Date: Thu, 23 Jan 2014 11:42:43 -0700 Subject: [PATCH] Change the default for auto-destruction of leases. Before it defaulted to no auto-destroy and you specified -A to turn it on. Now we default to auto-destroy and you specify -N to turn it off. I was being overly paranoid and you can accomplish the same thing by setting the autodestroy sitevar for each lease type to 0. --- tbsetup/lease_daemon.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tbsetup/lease_daemon.in b/tbsetup/lease_daemon.in index 92e96e22b..4353f01b3 100644 --- a/tbsetup/lease_daemon.in +++ b/tbsetup/lease_daemon.in @@ -86,12 +86,12 @@ sub usage() print STDOUT "Usage: reload_daemon [-d]\n" . " -d Prevent daemonization\n" . " -n Just state what would be done without doing it\n" . - " -A Automatically destroy expired leases (ow, they are locked)\n" . + " -D Disable auto-destruction of expired leases, locking them instead\n" . " -1 Run a single pass and then quit\n" . " -I int Time between checks (in minutes)\n"; exit(-1); } -my $optlist = "dnAI:1"; +my $optlist = "dnDI:1"; # # Configure variables @@ -125,7 +125,7 @@ my %vars = (); my $logfile = "$TB/log/lease_daemon.log"; my $debug = 0; my $impotent = 0; -my $autodestroy = 0; +my $autodestroy = 1; my $checkint = $CHECK; my $onceonly = 0; @@ -157,8 +157,8 @@ if (defined($options{"d"})) { if (defined($options{"n"})) { $impotent = 1; } -if (defined($options{"A"})) { - $autodestroy = 1; +if (defined($options{"D"})) { + $autodestroy = 0; } if (defined($options{"I"})) { $checkint = $options{"I"} * 60; -- GitLab