diff options
author | Cy Schubert <cy@FreeBSD.org> | 2017-06-14 06:46:32 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2017-06-14 06:46:32 +0000 |
commit | fe1fd540a219534b137ca8de253ff1d83daed9d6 (patch) | |
tree | e072dd929c5b735715639e9091f5cfc6466b22dc /sysutils/nut | |
parent | 8b47fa974ff4fba1fcf4109439974eca2b0c69cf (diff) | |
download | ports-fe1fd540a219534b137ca8de253ff1d83daed9d6.tar.gz ports-fe1fd540a219534b137ca8de253ff1d83daed9d6.zip |
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>
Notes
Notes:
svn path=/head/; revision=443556
Diffstat (limited to 'sysutils/nut')
-rw-r--r-- | sysutils/nut/Makefile | 2 | ||||
-rw-r--r-- | sysutils/nut/files/nut.in | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/sysutils/nut/Makefile b/sysutils/nut/Makefile index b6ed07ca0f2e..9bcc52be4c6c 100644 --- a/sysutils/nut/Makefile +++ b/sysutils/nut/Makefile @@ -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 diff --git a/sysutils/nut/files/nut.in b/sysutils/nut/files/nut.in index a4072faadd92..e40f4e859ddf 100644 --- a/sysutils/nut/files/nut.in +++ b/sysutils/nut/files/nut.in @@ -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 |