Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 1143

Summary: /etc/init.d/apmd tries to create to pid-files and aborts
Product: Gentoo Linux Reporter: Christian Loitsch <gentoo-bug>
Component: Current packagesAssignee: Martin Schlemmer (RETIRED) <azarah>
Status: RESOLVED FIXED    
Severity: minor CC: gentoo-bug
Priority: High    
Version: 1.0 RC6 r14   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Christian Loitsch 2002-03-14 07:27:13 UTC
/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}
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2002-03-14 15:47:09 UTC
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.
Comment 2 Donny Davies (RETIRED) gentoo-dev 2002-03-17 21:30:07 UTC
fixed.  thanks to Christian and Azarah for analysis.