From 5b286f269671b980bb34eb46db1fdfe4dd8358d0 Mon Sep 17 00:00:00 2001 From: digimer Date: Thu, 28 Sep 2023 00:24:29 -0400 Subject: [PATCH] Added missing switch reading in anvil-manage-power. Signed-off-by: digimer --- tools/anvil-manage-power | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/anvil-manage-power b/tools/anvil-manage-power index 45305905..50386ba0 100755 --- a/tools/anvil-manage-power +++ b/tools/anvil-manage-power @@ -40,7 +40,9 @@ $anvil->Get->switches({list => [ "power-off", "poweroff", "reboot", - "reboot-needed"], man => $THIS_FILE}); + "reboot-needed", + "y", + "yes"], man => $THIS_FILE}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => $anvil->data->{switches}}); $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 2, key => "log_0115", variables => { program => $THIS_FILE }}); @@ -202,10 +204,10 @@ sub do_poweroff # To minimize the trouble of a problem where the reboot needed flag isn't cleared, and so the system # wants to repeatedly reboot, we need to add a delay to not let anvil-daemon ask us to - # reboot/power-off until the system uptime is more than ten minutes. + # reboot/power-off until the system uptime is more than five minutes. if (($uptime) && ($uptime < 300)) { - # We'll wait until the system has been running for ten minutes. + # We'll wait until the system has been running for five minutes. my $difference = 300 - $uptime; $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, secure => 0, key => "log_0224", variables => { task => $task eq "poweroff" ? "#!string!log_0225!#" : "#!string!log_0226!#",