From owner-svn-ports-all@freebsd.org Wed Jun 14 06:46:33 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5294D87523; Wed, 14 Jun 2017 06:46:33 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A32F07C693; Wed, 14 Jun 2017 06:46:33 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5E6kWd9026636; Wed, 14 Jun 2017 06:46:32 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5E6kWKc026634; Wed, 14 Jun 2017 06:46:32 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201706140646.v5E6kWKc026634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 14 Jun 2017 06:46:32 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r443556 - in head/sysutils/nut: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jun 2017 06:46:33 -0000 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 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