git: 099516e24bd6 - main - net/ptpd2: Add default configfile to rc script
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 26 May 2024 13:31:48 UTC
The branch main has been updated by skreuzer: URL: https://cgit.FreeBSD.org/ports/commit/?id=099516e24bd625aeb524c5f9364b394c78af82b2 commit 099516e24bd625aeb524c5f9364b394c78af82b2 Author: Steven Kreuzer <skreuzer@FreeBSD.org> AuthorDate: 2024-05-26 13:28:27 +0000 Commit: Steven Kreuzer <skreuzer@FreeBSD.org> CommitDate: 2024-05-26 13:31:38 +0000 net/ptpd2: Add default configfile to rc script Add a default configfile to the rc script to allow ptpd2 to start up PR: 279025 Reported by: Ekkehard 'Ekki' Gehm <gehm@sudoers.net> --- net/ptpd2/Makefile | 2 +- net/ptpd2/files/ptpd2.in | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/net/ptpd2/Makefile b/net/ptpd2/Makefile index 6deaa88b3a68..0248157471b0 100644 --- a/net/ptpd2/Makefile +++ b/net/ptpd2/Makefile @@ -1,6 +1,6 @@ PORTNAME= ptpd DISTVERSION= 2.3.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net PKGNAMESUFFIX= 2 diff --git a/net/ptpd2/files/ptpd2.in b/net/ptpd2/files/ptpd2.in index 19e341dc5796..d084ae8afb77 100644 --- a/net/ptpd2/files/ptpd2.in +++ b/net/ptpd2/files/ptpd2.in @@ -8,15 +8,21 @@ # # ptpd2_enable (bool): Set to "NO" by default # Set it to "YES" to enable ptpd +# ptp2_configfile (str): Set to "/usr/local/etc/ptpd2/ptpd2.conf" by default . /etc/rc.subr -name="ptpd2" +name=ptpd2 rcvar=ptpd2_enable -command="%%PREFIX%%/sbin/${name}" +load_rc_config "${name}" -ptpd2_enable=${ptpd2_enable:-"NO"} +: ${ptpd2_enable:=NO} +: ${ptpd2_configfile:=/usr/local/etc/ptpd2/ptpd2.conf} + +required_files="${ptpd2_configfile}" + +command="/usr/local/sbin/${name}" +command_args="-c ${ptpd2_configfile}" -load_rc_config $name run_rc_command "$1"