Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    2.2.3 Avahi Exits after Reboot - Have to Hit "Save" to Get Running

    Scheduled Pinned Locked Moved pfSense Packages
    19 Posts 3 Posters 3.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      doktornotor Banned
      last edited by

      Meanwhile, I've created a PR to clean up the package code, however I don't think it's gonna help here at all… You can try it though: https://github.com/pfsense/pfsense-packages/pull/983 - Replace the files in /usr/local/pkg after making a backup.

      Maybe sleep 5 is not enough time for the dbus junk to start?  ::)

      1 Reply Last reply Reply Quote 0
      • cwagzC
        cwagz
        last edited by

        Thanks for doing this.  I will try to figure it out tonight and see if it works.

        Do I just change the 5 to a 10 in my version to test it out?

        	if (file_exists(AVAHI_BASE . "/etc/rc.d/dbus")) {
        		$start .= AVAHI_BASE . "/etc/rc.d/dbus onestop\n";
        		$start .= "/bin/rm /var/run/dbus/dbus.pid >/dev/null 2>&1\n";
        		$start .= AVAHI_BASE . "/etc/rc.d/dbus onestart\n";
        	}
        	$start .= "sleep 5\n";
        	$start .= AVAHI_BASE . "/sbin/avahi-daemon -D\n";
        	$start .= "/etc/rc.conf_mount_ro\n";
        

        Netgate 6100 MAX

        1 Reply Last reply Reply Quote 0
        • D
          doktornotor Banned
          last edited by

          Yes, just replace 5 with something bigger.

          1 Reply Last reply Reply Quote 0
          • cwagzC
            cwagz
            last edited by

            Looks like it does not like the

            service_start("avahi")
            
            Crash report begins.  Anonymous machine information:
            
            amd64
            10.1-RELEASE-p15
            FreeBSD 10.1-RELEASE-p15 #0 c5ab052(releng/10.1)-dirty: Sat Jul 25 20:20:58 CDT 2015     root@pfs22-amd64-builder:/usr/obj.amd64/usr/pfSensesrc/src/sys/pfSense_SMP.10
            
            Crash report details:
            
            PHP Errors:
            [11-Aug-2015 17:43:35 America/Los_Angeles] PHP Fatal error:  Call to undefined function service_start() in /usr/local/pkg/avahi.inc on line 217
            
            Filename: /var/crash/minfree
            2048
            

            I am not sure how to fix this.  I did sign up for Github though and am very interested in learning.

            Thanks!

            Netgate 6100 MAX

            1 Reply Last reply Reply Quote 0
            • P
              phil.davis
              last edited by

              I put some comments on that PR 983. The functions to start and stop the service are actually called:
              start_service
              stop_service

              So edit avahi.inc and fix those and see how it goes.

              As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
              If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

              1 Reply Last reply Reply Quote 0
              • D
                doktornotor Banned
                last edited by

                @cwagz:

                Looks like it does not like the

                service_start("avahi")
                

                Yeah it obviously doesn't like those; already fixed. :D

                1 Reply Last reply Reply Quote 0
                • cwagzC
                  cwagz
                  last edited by

                  Ok so changing the sleep time does not help the problem.  I tried up to 100 which just changed the position of the error in the log.

                  I found this on another forum saying that "enable-dbus=yes" should be set to no.  I made this change and the service started after reboot and seems to be working.

                  Does this make sense?  Does restarting the service after boot or hitting save actually start it without the dbus requirement?

                  Chad

                  Netgate 6100 MAX

                  1 Reply Last reply Reply Quote 0
                  • cwagzC
                    cwagz
                    last edited by

                    this was where i found the info:

                    https://dev.openwrt.org/ticket/12971

                    Netgate 6100 MAX

                    1 Reply Last reply Reply Quote 0
                    • D
                      doktornotor Banned
                      last edited by

                      ~~Well frankly I'm not touching that. If you don't want dbus, then you compile the thing without dbus. It's working perfectly fine for many people without such hacks, really no idea what's wrong with dbus for you. It the dbus-daemon running? Does the socket exist?

                      File a bug at Redmine perhaps to get it recompiled without dbus, then all the dbus-related stuff can be simply removed from the code as there's no point in installing dbus, running and dealing with dbus in that case.~~

                      Scratch this. Added a checkbox to disable D-BUS to the PR linked above. Don't have time to investigate this shit, and generally no interest in using this package either. I did code-style fixes. Don't want to touch it ever again.

                      1 Reply Last reply Reply Quote 0
                      • cwagzC
                        cwagz
                        last edited by

                        Thank you for doing the work you did.

                        Netgate 6100 MAX

                        1 Reply Last reply Reply Quote 0
                        • D
                          doktornotor Banned
                          last edited by

                          Does the checkbox work for you? :P

                          1 Reply Last reply Reply Quote 0
                          • cwagzC
                            cwagz
                            last edited by

                            @doktornotor:

                            Does the checkbox work for you? :P

                            Yes it works great.  Not sure whats up with my stuff.  This has persisted across several VMs.  I do not even have a var/run/dbus directory.  Looks alot like this bug to me:
                            https://redmine.pfsense.org/issues/2535

                            Anyway - it seems to work fine without Dbus.

                            Thanks again.

                            Netgate 6100 MAX

                            1 Reply Last reply Reply Quote 0
                            • cwagzC
                              cwagz
                              last edited by

                              I went ahead and submitted a bug on this issue after testing again in a brand new clean VM.
                              https://redmine.pfsense.org/issues/4932

                              Netgate 6100 MAX

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post
                              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.