From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830 Description of problem: The apmscript restarts services first, before restarting network. Version-Release number of selected component (if applicable): apmd-3.0.2-12 How reproducible: Always Steps to Reproduce: 1. Start named on laptop. Set NET_RESTART="yes" and RESTORESERVICES="named" in /etc/sysconfig/apmd 2. Suspend. 3. Resume. Actual Results: Named (bind-9.2.1) tries to start, but fails because no nw ifs (beside lo?) are available. Expected Results: Named should be running normally. It should have been restarted only after network is up and running. Additional info: Here is my patch: --- /etc/sysconfig/apm-scripts/apmscript.orig 2003-03-02 20:54:42.000000000 +0200 +++ /etc/sysconfig/apm-scripts/apmscript 2003-03-02 20:52:10.000000000 +0200 @@ -39,10 +39,15 @@ [ -f /etc/sysconfig/apm-scripts/apmcontinue-pre ] && /etc/sysconfig/apm-scripts/apmcontinue-pre # Stop services that might break echo "#!/bin/sh" >/var/run/apm-resume-post + post_services="" + if [ -n "$RESTORESERVICES" ]; then for i in $RESTORESERVICES; do if /sbin/service $i status &>/dev/null; then - echo "/sbin/service $i start" >>/var/run/apm-resume-post + # Make sure services are restarted in reverse order + # and after network has been restarted + post_services="/sbin/service $i start +$post_services" /sbin/service $i stop &>/dev/null fi done @@ -181,6 +186,8 @@ fi sync + echo "$post_services" >> /var/run/apm-resume-post + [ -f /etc/sysconfig/apm-scripts/apmcontinue ] && . /etc/sysconfig/apm-scripts/apmcontinue "$@" [ -e /var/run/apm-resume-post ] && chmod 0755 /var/run/apm-resume-post
Fixed differently in 3.0.2-19.