diff --git a/sysutils/nut-devel/Makefile b/sysutils/nut-devel/Makefile index 1f94319584fe..bff162740c92 100644 --- a/sysutils/nut-devel/Makefile +++ b/sysutils/nut-devel/Makefile @@ -1,6 +1,6 @@ PORTNAME= nut PORTVERSION= ${NUT_COMMIT_DATE} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils PKGNAMESUFFIX= -devel # MASTER_SITES= http://www.networkupstools.org/source/${PORTVERSION:R}/ diff --git a/sysutils/nut-devel/files/nut.in b/sysutils/nut-devel/files/nut.in index 0e4cb9e8a618..ae9ee30f03f5 100644 --- a/sysutils/nut-devel/files/nut.in +++ b/sysutils/nut-devel/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-devel/files/nut.newsyslog b/sysutils/nut-devel/files/nut.newsyslog index fc50b6c1be32..4a3a4350cee5 100644 --- a/sysutils/nut-devel/files/nut.newsyslog +++ b/sysutils/nut-devel/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 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