From f9bbc5173c18dfcec434c73c69eae9d312b27c90 Mon Sep 17 00:00:00 2001 From: Pascal Coudurier Date: Tue, 4 Jan 2022 14:12:31 +0100 Subject: [PATCH] nut: refactor upssched uci-defaults script Add checks not to overwrite defaultnotify options in the nut-sendmail-notify fashion. Use lists for defaultnotify instead of option. Add check not to overwrite notifycmd if already defined. upssched-cmd script must not be called directly, it is called by the upssched binary with needed arguments. Signed-off-by: Pascal Coudurier --- net/nut/Makefile | 2 +- net/nut/files/nut-sched.default | 55 +++++++++++++++++++++++++++++---- 2 files changed, 50 insertions(+), 7 deletions(-) diff --git a/net/nut/Makefile b/net/nut/Makefile index ed065311cc..42839b7667 100644 --- a/net/nut/Makefile +++ b/net/nut/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nut PKG_VERSION:=2.7.4 -PKG_RELEASE:=25 +PKG_RELEASE:=26 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.networkupstools.org/source/2.7/ diff --git a/net/nut/files/nut-sched.default b/net/nut/files/nut-sched.default index d8b13f0e3b..4b73b6c61c 100644 --- a/net/nut/files/nut-sched.default +++ b/net/nut/files/nut-sched.default @@ -1,10 +1,53 @@ #!/bin/sh -uci batch <