Bug 54041
Summary: | network/netfs restart should be conditional | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Toralf <bugzilla> | ||||||
Component: | apmd | Assignee: | Bernhard Rosenkraenzer <bero> | ||||||
Status: | CLOSED RAWHIDE | QA Contact: | Aaron Brown <abrown> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 7.2 | ||||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | i386 | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2001-11-16 10:46:11 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Toralf
2001-09-26 14:16:07 UTC
It already is. Use the NETFS_RESTART parameter in /etc/sysconfig/apmd. You didn't really read the bug description, did you? NETFS_RESTART="yes" will cause netfs to be started when resuming regardless of whether it was actually active, or enabled via chkconfig, when suspending. I think this is wrong as the state should remain the same after suspend + resume. Also, you shoudn't have to change several config files to disable or enable a service, 'chkconfig' should be enough. To put it differently, the values of these flags should in my opinion be intepreted as follows: <service>_RESTART="no" : Leave <service> alone. <service>_RESTART_"yes": Restart <service> if it was already running and/or 'chkconfig <service>' is true. No change after upgrade to Red Hat Linux 7.2. Created attachment 37743 [details]
Proposed update
The attached patch introduces chkconfig support in apmscript. The services will be always be stopped on suspend, but restarted on resume only if enabled via 'chkconfig' - all provided that the appropriate flag is set in /etc/sysconfig/apmd, of course. This means that the system will be brought back to the default state after suspend, i.e. the same one as after a reboot. You could say that this is also wrong, and that the state shouldn't be changed at all, but in many causes I want a reset like this as I often disconnect the machine from the network while it's suspended. I've changed this in -36, differently, though. It returns things to the state they were in at suspend time; I think this is preferrable (do you want to start netfs even when you're on a train/plane? If not, simply "service netfs stop" before suspending), and more consistant with the other things apmd does. Created attachment 37744 [details]
Introduce ypbind restart in apmscript
Use RESTORESERVICES (introduced in -35) to restart ypbind... special-casing it isn't needed. Didn't notice your last change, there, until after I had attached another patch; it will introduce similar restart support for "ypbind", but in the manner of my first patch, not the updated logic. Anyhow, your update sounds better; I guess it's not available for download just yet so that I can test it. The only argument for my approach is that it might save the day if you issue "netfs start" or similar by hand, then forget to stop the service, but the main reason for updating the way I did was that implementing proper state handling seemed like more work. I'm looking at the apmscript in release 35 now... I rather like the way it's structured, but can it actually work? It seems to me that e.g. "/sbin/service netfs status" will return successfully even when the service has been stopped, but perhaps I'm missing something obvious. (But I think it's really a netfs/initscripts bug, not an apmd one, if I'm right.) |