sysutils/bsdfan: the port had been improved (+)
- Install rc-script with resume command support
- Respect installation ${PREFIX} while I'm here
PR: 276991
Submitted by: Viacheslav Chimishuk
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
PORTNAME= bsdfan
|
||||
PORTVERSION= g20180112
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= sysutils
|
||||
|
||||
MAINTAINER= danfe@FreeBSD.org
|
||||
@@ -16,7 +17,8 @@ USES= uidfix
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= claudiozz
|
||||
GH_TAGNAME= d8428a7
|
||||
MAKE_ARGS= MANDIR=${PREFIX}/share/man/man
|
||||
MAKE_ARGS= BINDIR=${PREFIX}/bin MANDIR=${PREFIX}/share/man/man
|
||||
USE_RC_SUBR= ${PORTNAME}
|
||||
|
||||
PLIST_FILES= bin/bsdfan share/man/man1/bsdfan.1.gz \
|
||||
@sample\ etc/bsdfan.conf.sample
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# PROVIDE: bsdfan
|
||||
# REQUIRE: DAEMON
|
||||
# KEYWORD: resume shutdown
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="bsdfan"
|
||||
desc="Control fan speed using temperature sensor"
|
||||
rcvar="bsdfan_enable"
|
||||
|
||||
: ${bsdfan_enable="NO"}
|
||||
: ${bsdfan_flags="-d"}
|
||||
|
||||
command="%%PREFIX%%/bin/${name}"
|
||||
extra_commands="resume"
|
||||
resume_cmd="bsdfan_resume"
|
||||
|
||||
bsdfan_resume()
|
||||
{
|
||||
run_rc_command restart
|
||||
}
|
||||
|
||||
load_rc_config ${name}
|
||||
run_rc_command "$1"
|
||||
Reference in New Issue
Block a user