From fb943fce8920492f4c510dd983138b40c6e28a9f Mon Sep 17 00:00:00 2001 From: jim-p Date: Sun, 19 Apr 2009 19:14:43 -0400 Subject: Add an option to the NUT package that will let the user choose to power down (shutdown -p) instead of halt. Should fix Ticket #1882 Shutdown -p will only work on supported systems. Since the behavior on unsupported systems is unknown, giving the user a choice seemed like the better way. --- config/nut/nut.inc | 7 +++++-- config/nut/nut.xml | 5 +++++ 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'config/nut') diff --git a/config/nut/nut.inc b/config/nut/nut.inc index a8465dce..987dbe83 100644 --- a/config/nut/nut.inc +++ b/config/nut/nut.inc @@ -172,6 +172,7 @@ $remoteaddr = nut_config('remoteaddr'); $remoteuser = nut_config('remoteuser'); $remotepass = nut_config('remotepass'); + $shutdownflag = (nut_config('powerdown') == 'on') ? '-p' : '-h'; if(!($remotename && $remoteaddr && $remoteuser && $remotepass)) return false; @@ -180,7 +181,7 @@ $upsmon_conf = << + + Power Down Instead of Halt + powerdown + checkbox + Local Remote Access Address <br>(ex: 192.168.1.0/24) allowaddr -- cgit v1.2.3