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:
Alexey Dokuchaev 2024-12-08 14:27:22 +00:00
parent 172d3a190d
commit 45f03c6eb1
2 changed files with 30 additions and 1 deletions

View file

@ -1,5 +1,6 @@
PORTNAME= bsdfan PORTNAME= bsdfan
PORTVERSION= g20180112 PORTVERSION= g20180112
PORTREVISION= 1
CATEGORIES= sysutils CATEGORIES= sysutils
MAINTAINER= danfe@FreeBSD.org MAINTAINER= danfe@FreeBSD.org
@ -16,7 +17,8 @@ USES= uidfix
USE_GITHUB= yes USE_GITHUB= yes
GH_ACCOUNT= claudiozz GH_ACCOUNT= claudiozz
GH_TAGNAME= d8428a7 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 \ PLIST_FILES= bin/bsdfan share/man/man1/bsdfan.1.gz \
@sample\ etc/bsdfan.conf.sample @sample\ etc/bsdfan.conf.sample

View file

@ -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"