Red Hat Bugzilla – Bug 44603
please provide a pre-suspend hook
Last modified: 2014-03-16 22:21:14 EDT
Description of Problem:
On my laptop I am running am-utils and have set
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
Latter solution could be (the `+'-line):
------ /etc/sysconfig/apm-scripts/apmscript ----
case "$PROG" in
+ [ -f /etc/sysconfig/apm-scripts/apmcontinue-pre ] && .
# 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'.
Done in 3.0final-33, thanks for the suggestion
*** Bug 45706 has been marked as a duplicate of this bug. ***
pre-hook support disappeared in apmd-3.0final-34 and -35. Is this intentionally
or just a mistake?
Mistake. Re-added in 3.0.2-6.
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.
That was fixed in 3.0.2-16.