From owner-dev-commits-ports-all@freebsd.org Fri Aug 27 21:55:32 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ACF2B6687F9; Fri, 27 Aug 2021 21:55:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GxD6X4F0Hz3rgx; Fri, 27 Aug 2021 21:55:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 78A163004; Fri, 27 Aug 2021 21:55:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17RLtWTR095086; Fri, 27 Aug 2021 21:55:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17RLtW44095085; Fri, 27 Aug 2021 21:55:32 GMT (envelope-from git) Date: Fri, 27 Aug 2021 21:55:32 GMT Message-Id: <202108272155.17RLtW44095085@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dan Langille Subject: git: 921e007cc543 - main - net/mosquitto: update rc.d script to fix mosquitto_pidfile override MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dvl X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 921e007cc543520bac1adf9e96de9483cb3e725e Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2021 21:55:32 -0000 The branch main has been updated by dvl: URL: https://cgit.FreeBSD.org/ports/commit/?id=921e007cc543520bac1adf9e96de9483cb3e725e commit 921e007cc543520bac1adf9e96de9483cb3e725e Author: Dan Langille AuthorDate: 2021-08-27 21:35:40 +0000 Commit: Dan Langille CommitDate: 2021-08-27 21:55:16 +0000 net/mosquitto: update rc.d script to fix mosquitto_pidfile override The default variables were being set before load_rc_config was invoked. jrm@FreeBSD.org did most of this work and all credit goes to him. I only found the problem. He helped tremendously. PR: 258089 Reported by: dvl Approved by: joe@thrallingpenguin.com (maintainer) Obtained from: jrm --- net/mosquitto/Makefile | 2 +- net/mosquitto/files/mosquitto.in | 17 +++++------------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/net/mosquitto/Makefile b/net/mosquitto/Makefile index a98109f9c046..3eb41683cd24 100644 --- a/net/mosquitto/Makefile +++ b/net/mosquitto/Makefile @@ -2,7 +2,7 @@ PORTNAME= mosquitto PORTVERSION= 2.0.10 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net MASTER_SITES= https://mosquitto.org/files/source/ diff --git a/net/mosquitto/files/mosquitto.in b/net/mosquitto/files/mosquitto.in index ae1bd703ecbc..6739272ff147 100644 --- a/net/mosquitto/files/mosquitto.in +++ b/net/mosquitto/files/mosquitto.in @@ -19,6 +19,8 @@ name=mosquitto rcvar=mosquitto_enable +load_rc_config $name + mosquitto_enable=${mosquitto_enable:="NO"} mosquitto_config=${mosquitto_config:="%%PREFIX%%/etc/mosquitto/mosquitto.conf"} mosquitto_user=${mosquitto_user:="nobody"} @@ -28,17 +30,8 @@ command_args="-c ${mosquitto_config} -d" pidfile=${mosquitto_pidfile:-"/var/run/mosquitto.pid"} required_files=${mosquitto_config} -extra_commands="reload" -stop_postcmd=stop_postcmd -stop_postcmd() -{ - rm -f $pidfile -} -start_precmd=start_precmd -start_precmd() -{ - install -o ${mosquitto_user} -m 644 /dev/null ${pidfile} -} +extra_commands=reload +stop_postcmd="rm -f $pidfile" +start_precmd="install -o ${mosquitto_user} -m 644 /dev/null ${pidfile}" -load_rc_config $name run_rc_command "$1"