[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 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258089

--- Comment #1 from Dan Langille <dvl_at_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_at_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
_at__at_ -19,6 +19,7 _at__at_
 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"}
_at__at_ -40,5 +41,10 _at__at_
        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_at_gelt:/usr/local/etc/rc.d] $

-- 
You are receiving this mail because:
You are the assignee for the bug.
Received on Fri Aug 27 2021 - 16:48:20 UTC

Original text of this message