<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>1143</bug_id>
          
          <creation_ts>2002-03-14 07:27 0000</creation_ts>
          <short_desc>/etc/init.d/apmd tries to create to pid-files and aborts</short_desc>
          <delta_ts>2003-02-04 19:42:18 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>1.0 RC6 r14</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>gentoo-bug@abc.delta64.com</reporter>
          <assigned_to>azarah@gentoo.org</assigned_to>
          <cc>gentoo-bug@abc.delta64.com</cc>

      

      
          <long_desc isprivate="0">
            <who>gentoo-bug@abc.delta64.com</who>
            <bug_when>2002-03-14 07:27:13 0000</bug_when>
            <thetext>/etc/init.d/apmd start fails saying that another apmd is already
started, and I should delete /var/run/apdm.pid if this is not correct.

Found out, that apmd creates its pid-file and the option 
--make-pidfile --pidfile /var/run/apmd.pid tries to create another one

fix: change to:
#       start-stop-daemon --start --quiet --exec /usr/sbin/apmd \
#               --make-pidfile --pidfile /var/run/apmd.pid -- ${APMD_OPTS}
        start-stop-daemon --start --quiet --exec /usr/sbin/apmd -- ${APMD_OPTS}</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>azarah@gentoo.org</who>
            <bug_when>2002-03-14 15:47:09 0000</bug_when>
            <thetext>Hi

I do not use APM, but ACPI, so if you could help me here ..

Try to change it to:

    start-stop-daemon --start --quiet --pidfile /var/run/apmd.pid \
        --startas /usr/sbin/apmd -- ${APMD_OPTS}

and see if that works fine.

The difference is, it will start apmd, and then check if the pid is created ok.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>woodchip@gentoo.org</who>
            <bug_when>2002-03-17 21:30:07 0000</bug_when>
            <thetext>fixed.  thanks to Christian and Azarah for analysis.

</thetext>
          </long_desc>
      
    </bug>

</bugzilla>