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

    Bug in apcupsd package

    Scheduled Pinned Locked Moved pfSense Packages
    2 Posts 2 Posters 808 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.
    • M Offline
      mir
      last edited by

      Hi apcupsd package maintainer,

      I have found a bug in the apcupsd upstart script which prevents the daemon to start. The reason is that the left-over lock file is not proper detected in which case the script fails to remove it before trying to start apcupsd. As a result the daemon refused to start do to a left-over lock file from last run (lock file is named LCK..cuau0, LCK..cuau1 etc). Below patch fixes it.

      –- /usr/local/etc/rc.d/apcupsd.sh      2014-12-01 00:59:52.000000000 +0100
      +++ /tmp/apcupsd.sh    2014-12-01 01:13:12.000000000 +0100
      @@ -7,8 +7,8 @@
              if [ ! -d /var/tmp ]; then
                      /bin/mkdir -p /var/tmp
              fi
      -      if [ -f /var/tmp/LCK.. ]; then
      -              /bin/rm -f /var/tmp/LCK..
      +      if [ -f /var/tmp/LCK..* ]; then
      +              /bin/rm -f /var/tmp/LCK..*
              fi
              /usr/pbi/apcupsd-amd64/sbin/apcupsd
      }

      1 Reply Last reply Reply Quote 0
      • D Offline
        dbaio
        last edited by

        Thanks.

        This script needs an update.

        Also, you can modify the path to lockfile on the GUI.  :-[

        –
        Danilo G. Baio (dbaio)

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