Bug 44603 - please provide a pre-suspend hook
Summary: please provide a pre-suspend hook
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: apmd   
(Show other bugs)
Version: 8.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Aaron Brown
: 45706 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2001-06-14 17:52 UTC by Enrico Scholz
Modified: 2014-03-17 02:21 UTC (History)
1 user (show)

Fixed In Version: 3.0.2-16
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-05-19 20:50:01 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Enrico Scholz 2001-06-14 17:52:03 UTC
Description of Problem:

On my laptop I am running am-utils and have set


in /etc/sysconfig/apmd.

Everytime I am suspending the machine, /etc/sysconfig/apm-scripts/apmscript
tries to unmount all NFS volumes by calling `/etc/rc.d/init.d/netfs stop'.

Because am-utils managed directories are appearing as NFS volumes, the
netfs script will try to unmount them also. This does not work and the
`umount -a -t nfs' hangs until it times out.

The proper way would be to stop `amd' before.

This can be cured by handling the am-utils case in the `apmscript'
explicitly or by providing a hook for scripts being executed before all
other actions.

Latter solution could be (the `+'-line):

------ /etc/sysconfig/apm-scripts/apmscript ----
case "$PROG" in
+        [ -f /etc/sysconfig/apm-scripts/apmcontinue-pre ] && .
/etc/sysconfig/apm-scripts/apmcontinue-pre "$PROG"
        # Remove sound progs and modules if requested
        if [ "$RESTORESOUND" = "yes" -o "$RESTORESOUNDPROGS" = "yes" ]; 

Then the user can place in /etc/sysconfig/apm-scripts/apmcontinue-pre
needed actions like `service amd stop'.

Comment 1 Bernhard Rosenkraenzer 2001-06-26 16:28:21 UTC
Done in 3.0final-33, thanks for the suggestion

Comment 2 Bernhard Rosenkraenzer 2001-06-26 16:29:08 UTC
*** Bug 45706 has been marked as a duplicate of this bug. ***

Comment 3 Enrico Scholz 2001-11-16 17:52:19 UTC
pre-hook support disappeared in apmd-3.0final-34 and -35. Is this intentionally
or just a mistake?

Comment 4 Bernhard Rosenkraenzer 2002-02-26 16:55:21 UTC
Mistake. Re-added in 3.0.2-6.

Comment 5 Aleksey Nogin 2002-11-22 06:15:27 UTC
For some reason /etc/sysconfig/apm-scripts/apmcontinue-pre is now called w/o any
arguments which makes it somewhat useless. It should be called with $@ as arguments.


Comment 6 Bill Nottingham 2003-05-19 20:50:01 UTC
That was fixed in 3.0.2-16.

Note You need to log in before you can comment on or make changes to this bug.