From a2f64b3bacc9a82bb149b1ac9fa0b8278000d2e4 Mon Sep 17 00:00:00 2001 From: "Daniel F. Dickinson" Date: Mon, 27 Aug 2018 16:41:17 -0400 Subject: [PATCH] nut: Reduce user error with POWERDOWNFLAG Instead of making POWERDOWNFLAG an uci option the user can only change it via initscript edits. This avoids chance for users to miss the required change to nut-driver when setting an UCI option for nut-monitor which results in failure to do FSD on the UPS. Signed-off-by: Daniel F. Dickinson --- net/nut/files/nut-monitor.init | 3 +-- net/nut/files/nut_monitor | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/net/nut/files/nut-monitor.init b/net/nut/files/nut-monitor.init index 9505408d9..7a2675e27 100755 --- a/net/nut/files/nut-monitor.init +++ b/net/nut/files/nut-monitor.init @@ -35,8 +35,7 @@ nut_upsmon_conf() { config_get val "$cfg" deadtime 15 echo "DEADTIME $val" >> $UPSMON_C - config_get val "$cfg" powerdownflag /var/run/killpower - echo "POWERDOWNFLAG $val" >> $UPSMON_C + echo "POWERDOWNFLAG /var/run/killpower" >> $UPSMON_C config_get val "$cfg" onlinemsg [ -n "$val" ] && echo "NOTIFYMSG ONLINE \"$val\"" >> $UPSMON_C diff --git a/net/nut/files/nut_monitor b/net/nut/files/nut_monitor index 7b74bc31f..59e0f360d 100644 --- a/net/nut/files/nut_monitor +++ b/net/nut/files/nut_monitor @@ -8,7 +8,6 @@ # option pollfreqalert 5 # option hostsync 15 # option deadtime 15 -# option powerdownflags /var/run/killpower # option onlinemsg "online message" # option onbattmsg "on battery message" # option lowbattmsg "low battery message"