aboutsummaryrefslogtreecommitdiff
path: root/sysutils/nut
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2023-02-09 16:03:07 +0000
committerCy Schubert <cy@FreeBSD.org>2023-02-10 18:26:33 +0000
commita4cc1509a9b65367f76bbdf6b684035d0c3bfbc3 (patch)
treeed2826e95cf6e0b34d891af7d257b65eb71b6563 /sysutils/nut
parent65305c65424f26601292162f9d021cf0c4826952 (diff)
Diffstat (limited to 'sysutils/nut')
-rw-r--r--sysutils/nut/Makefile2
-rw-r--r--sysutils/nut/files/nut.in11
-rw-r--r--sysutils/nut/files/nut.newsyslog2
3 files changed, 13 insertions, 2 deletions
diff --git a/sysutils/nut/Makefile b/sysutils/nut/Makefile
index 81b4ebea94a9..3635e4d550fd 100644
--- a/sysutils/nut/Makefile
+++ b/sysutils/nut/Makefile
@@ -1,6 +1,6 @@
PORTNAME= nut
PORTVERSION= 2.8.0
-PORTREVISION= 16
+PORTREVISION= 17
CATEGORIES= sysutils
MASTER_SITES= http://www.networkupstools.org/source/${PORTVERSION:R}/
diff --git a/sysutils/nut/files/nut.in b/sysutils/nut/files/nut.in
index 0e4cb9e8a618..ae9ee30f03f5 100644
--- a/sysutils/nut/files/nut.in
+++ b/sysutils/nut/files/nut.in
@@ -32,6 +32,17 @@ start_precmd="nut_prestart"
stop_postcmd="nut_poststop"
nut_prestart() {
+ #
+ # As of PR/268960 UID/GID uucp is no longer used by nut.
+ # Instead UID/GID nut is used. Make sure preexisting nut files
+ # and directories are owned by nut instead of uucp.
+ #
+ if [ -f ${nut_prefix}/etc/nut/upsd.users ]; then
+ chgrp %%NUT_GROUP%% ${nut_prefix}/etc/nut/upsd.users
+ fi
+ find %%STATEDIR%% -user uucp -exec chown nut {} \;
+ find %%STATEDIR%% -group uucp -exec chgrp nut {} \;
+
${nut_prefix}/sbin/upsdrvctl start
}
diff --git a/sysutils/nut/files/nut.newsyslog b/sysutils/nut/files/nut.newsyslog
index fc50b6c1be32..4a3a4350cee5 100644
--- a/sysutils/nut/files/nut.newsyslog
+++ b/sysutils/nut/files/nut.newsyslog
@@ -3,5 +3,5 @@
# see newsyslog.conf(5) for details
#
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
-/var/log/nut/upsd.log uucp:uucp 644 7 100 * J /var/db/nut/upslog.pid
+/var/log/nut/upsd.log nut:nut 644 7 100 * J /var/db/nut/upslog.pid