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

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 27 Aug 2021 15:12:47 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258089

            Bug ID: 258089
           Summary: net/mosquitto: ignores mosquitto_pidfile set in
                    /etc/rc.conf
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs_at_FreeBSD.org
          Reporter: dvl_at_FreeBSD.org
                CC: joe_at_thrallingpenguin.com
                CC: joe_at_thrallingpenguin.com
             Flags: maintainer-feedback?(joe_at_thrallingpenguin.com)

For demonstration, I added these lines to a fresh install of mosquitto-2.0.10_1
on FreeBSD 13.0-RELEASE-p4.

They are placed just before the 'run_rc_command' line in
/usr/local/etc/rc.d/mosquitto :

echo mosquitto_enable=$mosquitto_enable
echo mosquitto_config=$mosquitto_config
echo mosquitto_user=$mosquitto_user
echo mosquitto_pidfile=$mosquitto_pidfile
echo pidfile=$pidfile

I am running with this configuration:

$ grep mosq /etc/rc.conf
mosquitto_enable="YES"
mosquitto_user="mosquitto"
mosquitto_pidfile="/var/run/mosquitto/mosquitto.pid"


$ sudo service mosquitto start
mosquitto_enable=YES
mosquitto_config=/usr/local/etc/mosquitto/mosquitto.conf
mosquitto_user=mosquitto
mosquitto_pidfile=/var/run/mosquitto/mosquitto.pid
pidfile=/var/run/mosquitto.pid
Starting mosquitto.

NOTE how pidfile has the wrong value but mosquitto_pidfile does.

Both files are created, but only one is correct.

$ sudo ls -l /var/run/mosquitto/mosquitto.pid /var/run/mosquitto.pid
-rw-r--r--  1 mosquitto  wheel      0 Aug 27 15:10 /var/run/mosquitto.pid
-rw-r--r--  1 mosquitto  mosquitto  5 Aug 27 15:10
/var/run/mosquitto/mosquitto.pid
Clearly, the value for mosquitto_pidfile is not being picked up from
/etc/rc.conf

I'm submitting this now and may be able to work on finding a solution soon.

-- 
You are receiving this mail because:
You are the assignee for the bug.
Received on Fri Aug 27 2021 - 15:12:47 UTC

Original text of this message