diff options
author | Cy Schubert <cy@FreeBSD.org> | 2017-06-14 01:58:51 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2017-06-14 01:58:51 +0000 |
commit | f43a233b2baa531b743105fcabf3923c70c21a5c (patch) | |
tree | 0dc7036ad1171d99d7eaabe1f345ed791c47988a /sysutils/nut | |
parent | A simple header-only logging library for C++. Add 'LinkingTo: plogr' (diff) |
Fixup "use default values" assignments.
Notes
Notes:
svn path=/head/; revision=443550
Diffstat (limited to 'sysutils/nut')
-rw-r--r-- | sysutils/nut/Makefile | 2 | ||||
-rw-r--r-- | sysutils/nut/files/nut.in | 11 | ||||
-rw-r--r-- | sysutils/nut/files/nut_upslog.in | 10 | ||||
-rw-r--r-- | sysutils/nut/files/nut_upsmon.in | 4 |
4 files changed, 16 insertions, 11 deletions
diff --git a/sysutils/nut/Makefile b/sysutils/nut/Makefile index e9a194f475e4..b6ed07ca0f2e 100644 --- a/sysutils/nut/Makefile +++ b/sysutils/nut/Makefile @@ -3,7 +3,7 @@ PORTNAME= nut PORTVERSION= 2.7.4 -PORTREVISION= 2 +PORTREVISION= 3 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 5b0e3cb86050..3a5f93635f04 100644 --- a/sysutils/nut/files/nut.in +++ b/sysutils/nut/files/nut.in @@ -15,8 +15,9 @@ # # DO NOT CHANGE THESE DEFAULT VALUES HERE # -nut_enable=${nut_enable-"NO"} -nut_prefix=${nut_prefix-"%%PREFIX%%"} +nut_enable=${nut_enable:-"NO"} +nut_prefix=${nut_prefix:-"%%PREFIX%%"} +nut_upsshut=${nut_upsshut:-"NO"} . /etc/rc.subr @@ -38,7 +39,11 @@ 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 diff --git a/sysutils/nut/files/nut_upslog.in b/sysutils/nut/files/nut_upslog.in index 9bb361e1d3be..2dbd79645549 100644 --- a/sysutils/nut/files/nut_upslog.in +++ b/sysutils/nut/files/nut_upslog.in @@ -15,11 +15,11 @@ # # DO NOT CHANGE THESE DEFAULT VALUES HERE # -nut_upslog_enable=${nut_upslog_enable-"NO"} -nut_upslog_prefix=${nut_upslog_prefix-"%%PREFIX%%"} -nut_upslog_logfile=${nut_upslog_logfile-"/var/log/ups.log"} -nut_upslog_interval=${nut_upslog_interval-"300"} -nut_upslog_ups=${nut_upslog_ups-"myups@localhost"} +nut_upslog_enable=${nut_upslog_enable:-"NO"} +nut_upslog_prefix=${nut_upslog_prefix:-"%%PREFIX%%"} +nut_upslog_logfile=${nut_upslog_logfile:-"/var/log/ups.log"} +nut_upslog_interval=${nut_upslog_interval:-"300"} +nut_upslog_ups=${nut_upslog_ups:-"myups@localhost"} . /etc/rc.subr diff --git a/sysutils/nut/files/nut_upsmon.in b/sysutils/nut/files/nut_upsmon.in index 8cf393a5b799..57f454480cbb 100644 --- a/sysutils/nut/files/nut_upsmon.in +++ b/sysutils/nut/files/nut_upsmon.in @@ -15,8 +15,8 @@ # # DO NOT CHANGE THESE DEFAULT VALUES HERE # -nut_upsmon_enable=${nut_upsmon_enable-"NO"} -nut_upsmon_prefix=${nut_upsmon_prefix-"%%PREFIX%%"} +nut_upsmon_enable=${nut_upsmon_enable:-"NO"} +nut_upsmon_prefix=${nut_upsmon_prefix:-"%%PREFIX%%"} . /etc/rc.subr |