[Bug 258089] net/mosquitto: ignores mosquitto_pidfile set in /etc/rc.conf

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 27 Aug 2021 16:48:20 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258089

--- Comment #1 from Dan Langille <dvl@FreeBSD.org> ---
The fix is to move "load_rc_config $name" before the variable assignments.

Credit to jrm via IRC and eborisch via Twitter for this.

[dan@gelt:/usr/local/etc/rc.d] $ diff -ruN mosquitto mosquitto.mine
--- mosquitto   2021-08-22 04:34:48.000000000 +0000
+++ mosquitto.mine      2021-08-27 16:45:52.963755000 +0000
@@ -19,6 +19,7 @@
 name=mosquitto
 rcvar=mosquitto_enable

+load_rc_config $name
 mosquitto_enable=${mosquitto_enable:="NO"}

mosquitto_config=${mosquitto_config:="/usr/local/etc/mosquitto/mosquitto.conf"}
 mosquitto_user=${mosquitto_user:="nobody"}
@@ -40,5 +41,10 @@
        install -o ${mosquitto_user} -m 644 /dev/null ${pidfile}
 }

-load_rc_config $name
+echo mosquitto_enable=$mosquitto_enable
+echo mosquitto_config=$mosquitto_config
+echo mosquitto_user=$mosquitto_user
+echo mosquitto_pidfile=$mosquitto_pidfile
+echo pidfile=$pidfile
+
 run_rc_command "$1"
[dan@gelt:/usr/local/etc/rc.d] $

-- 
You are receiving this mail because:
You are the assignee for the bug.