diff --git a/net/nut/Makefile b/net/nut/Makefile index db0897926..0074aa060 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-server.init b/net/nut/files/nut-server.init index 201a3ba85..045b29d48 100755 --- a/net/nut/files/nut-server.init +++ b/net/nut/files/nut-server.init @@ -38,6 +38,16 @@ upsd_statepath() { STATEPATH="$statepath" } +upsd_runas() { + local cfg="$1" + local runas + + [ -n "$RUNAS" ] && return + + config_get runas "$cfg" runas "nut" + RUNAS="$runas" +} + listen_address() { local cfg="$1" @@ -213,6 +223,7 @@ build_global_driver_config() { get_write_driver_config "$cfg" synchronous config_get runas "$cfg" user "nut" RUNAS="$runas" + upsd_runas echo "" >>$UPS_C }