From 45c95e86292479d8a9d0ef0beee51b26836fe598 Mon Sep 17 00:00:00 2001 From: "Daniel F. Dickinson" Date: Tue, 17 Dec 2019 06:17:53 -0500 Subject: [PATCH] nut: Fix NUT CGI startup script Commit c1aa1f784c737283b281da7a541921a88a81e684 which backported a number of fixes from master, missed one fix for nut-cgi. If nut-cgi is installed standalone or nut-cgi starts before nut-server (the default in 18.04.5) then the configuration file directory does not get create and therefore there is no CGI configuration file. This commit fixes that. Closes: #10687 Signed-off-by: Daniel F. Dickinson --- net/nut/Makefile | 2 +- net/nut/files/nut-cgi.init | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/net/nut/Makefile b/net/nut/Makefile index afb9c09759..0bdc7ded39 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:=10 +PKG_RELEASE:=11 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-cgi.init b/net/nut/files/nut-cgi.init index 13f1297fe7..a263bccda8 100755 --- a/net/nut/files/nut-cgi.init +++ b/net/nut/files/nut-cgi.init @@ -29,7 +29,8 @@ nut_upscgi_add() { } start() { - rm -f $UPSCGI_C + mkdir -m 0755 -p "$(dirname "$UPSCGI_C")" + rm -f "$UPSCGI_C" config_load nut_cgi