svn commit: r443556 - in head/sysutils/nut: . files
Cy Schubert
cy at FreeBSD.org
Wed Jun 14 06:46:33 UTC 2017
Author: cy
Date: Wed Jun 14 06:46:32 2017
New Revision: 443556
URL: https://svnweb.freebsd.org/changeset/ports/443556
Log:
If nut_upsshut is YES in rc.conf and POWERDOWNFLAG directive is in
upsmon.conf, send a powerdown signal to the UPS to shut down at
poweroff.
Suggested by: Alexander Milanov <a at amilanov.com>
Modified:
head/sysutils/nut/Makefile
head/sysutils/nut/files/nut.in
Modified: head/sysutils/nut/Makefile
==============================================================================
--- head/sysutils/nut/Makefile Wed Jun 14 06:37:32 2017 (r443555)
+++ head/sysutils/nut/Makefile Wed Jun 14 06:46:32 2017 (r443556)
@@ -3,7 +3,7 @@
PORTNAME= nut
PORTVERSION= 2.7.4
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= sysutils
MASTER_SITES= http://www.networkupstools.org/source/${PORTVERSION:R}/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${DISTNAME}${EXTRACT_SUFX}.sig
Modified: head/sysutils/nut/files/nut.in
==============================================================================
--- head/sysutils/nut/files/nut.in Wed Jun 14 06:37:32 2017 (r443555)
+++ head/sysutils/nut/files/nut.in Wed Jun 14 06:46:32 2017 (r443556)
@@ -38,7 +38,12 @@ nut_prestart() {
}
nut_poststop() {
- ${nut_prefix}/sbin/upsdrvctl stop
+ if ${nut_prefix}/sbin/upsdrvctl stop && checkyesno nut_upsshut; then
+ if ${nut_prefix}/sbin/upsmon -K; then
+ ${nut_prefix}/sbin/upsdrvctl shutdown
+ fi
+ fi
+
}
extra_commands=reload
More information about the svn-ports-all
mailing list