Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jun 2017 06:46:32 +0000 (UTC)
From:      Cy Schubert <cy@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r443556 - in head/sysutils/nut: . files
Message-ID:  <201706140646.v5E6kWKc026634@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706140646.v5E6kWKc026634>