|
Bugzilla – Full Text Bug Listing |
| Summary: | pm-utils-1.4.1-5.11.1.i586 misses functions and script 50rcnetwork contains errors | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 11.4 | Reporter: | Guy Zelck <guy.zelck> |
| Component: | Basesystem | Assignee: | Vojtech Dziewiecki <vdziewiecki> |
| Status: | VERIFIED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Major | ||
| Priority: | P3 - Medium | CC: | lmuelle, mt |
| Version: | Final | ||
| Target Milestone: | --- | ||
| Hardware: | x86-64 | ||
| OS: | openSUSE 11.4 | ||
| Whiteboard: | . | ||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Deadline: | 2012-03-28 | ||
| Attachments: |
Proposed patch
revised pm-utils-dhcp-interfaces.patch |
||
Guy, (In reply to comment #0) > User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.1) Gecko/20100101 > Firefox/10.0.1 > > 1. functions dhcp_clients, save_state and restore_state are missing from the > package or the 11.4 distribution so this script cannot work as supposed to. Looks the save_state/restore_state change to savestate/restorestate. dhcp_clients change to dhcp_interfaces? Not sure. > 2.command_exists dhcp_clients || exit $NA > Early in the script this test will make you exit. So nothing will be processes > for Networkmanager or ifup/ifdown setups. Yes, it doesn't work anymore. > 3. [ x"${NETWORKMANAGER}" -eq x"yes" ] && exit $NA > If you compare strings you need to use "=", not "-eq". Yes, we should change it. Marius, Do you know the meaning of dhcp_clients? Thanks! I've no idea. I'll look into pm-utils. (In reply to comment #3) > I've no idea. I'll look into pm-utils. Thanks for quick reply, and this network script was added at bnc#603291, it's in pm-utils-suse which owned by suse-self. :) I've no idea where the dhcp_clients should be from -- I've extracted pm-utils (and sysconfig from 11.2 [-> bnc#603291]), but I were unable to find it too. I think, Michal wanted to check / call the dhcp_interfaces() function from /etc/sysconfig/network/scripts/functions to get a list of all interfaces where a dhcp client is currently running... Created attachment 478133 [details]
Proposed patch
The attachment is not quite correct.
I followed Bin Li's leads, adapted the script and did a suspend/resume test => OK.
The body of the script should have this in it :
============================================================================
. "${PM_FUNCTIONS}"
# Sanity checks
[ -x /etc/init.d/network ] || exit $NA
[ -r /etc/sysconfig/network/config ] && . /etc/sysconfig/network/config
[ -r /etc/sysconfig/network/scripts/functions ] && . /etc/sysconfig/network/scripts/functions
command_exists dhcp_interfaces || exit $NA
# NetworkManager is handled by 55NetworkManager, so skip this script if
# nm is enabled in sysconfig ...
[ x"${NETWORKMANAGER}" = x"yes" ] && exit $NA
# ... or if it is running
command_exists nm_running && nm_running && exit $NA
case "$1" in
hibernate|suspend)
savestate "dhcp_interfaces" "`dhcp_interfaces`"
service network stop-all-dhcp-clients
;;
thaw|resume)
for interface in `restorestate "dhcp_interfaces"`; do
service network restart ${interface}
done
;;
*) exit $NA
;;
esac
============================================================================
Thanks for the quick reaction.
(In reply to comment #6) > Created an attachment (id=478133) [details] > Proposed patch Thanks a lot! (In reply to comment #7) > The attachment is not quite correct. > > I followed Bin Li's leads, adapted the script and did a suspend/resume test => > OK. > > The body of the script should have this in it : > > ============================================================================ > . "${PM_FUNCTIONS}" > > # Sanity checks > [ -x /etc/init.d/network ] || exit $NA > [ -r /etc/sysconfig/network/config ] && . /etc/sysconfig/network/config > [ -r /etc/sysconfig/network/scripts/functions ] && . > /etc/sysconfig/network/scripts/functions > > command_exists dhcp_interfaces || exit $NA > > # NetworkManager is handled by 55NetworkManager, so skip this script if > # nm is enabled in sysconfig ... > [ x"${NETWORKMANAGER}" = x"yes" ] && exit $NA > # ... or if it is running > command_exists nm_running && nm_running && exit $NA > > case "$1" in > hibernate|suspend) > savestate "dhcp_interfaces" "`dhcp_interfaces`" > service network stop-all-dhcp-clients > ;; > thaw|resume) > for interface in `restorestate "dhcp_interfaces"`; do > service network restart ${interface} > done > ;; > *) exit $NA > ;; > esac > > ============================================================================ > > Thanks for the quick reaction. Thanks for your feedback. Michal, Could we let in updates? Thanks! BTW, it also affect the 12.1, the same issue. Created attachment 478254 [details]
revised pm-utils-dhcp-interfaces.patch
It based on Marius' patch, just add restorestate.
It make sense to put 'command_exists dhcp_clients' after check NM status.
Anyway I just update it to 12.1. Request: #107316 submit: home:BinLi:branches:openSUSE:12.1:Update/pm-utils -> openSUSE:12.1:Update:Test Message: fix script 50rcnetwork error and update savestate/restorestate functions(bnc#749031). State: review 2012-02-28T05:45:30 BinLi This is an autogenerated message for OBS integration: This bug (749031) was mentioned in https://build.opensuse.org/request/show/107316 12.1 / pm-utils Maintenance, Could we let it in updates? Thanks! Cool, do you think you can do it for 11.4 as well? BTW: added to git and pushed fix to Factory http://gitorious.org/opensuse/pm-utils-suse/commit/41cb0c42e5f739b73d66f7a5de0d6d4d92b3c375 This is an autogenerated message for OBS integration: This bug (749031) was mentioned in https://build.opensuse.org/request/show/107429 Factory / pm-utils We will start an update for 11.4 and 12.1 after it is checked in into factory. Please have a look at the decline-message in the factory-submission. For the 11.4 update I'll provide a SWAMP-ID The SWAMPID for this issue is 45819. This issue was rated as low. Please submit fixed packages until 2012-03-28. Also create a patchinfo file using this link: https://swamp.suse.de/webswamp/wf/45819 (In reply to comment #18) > We will start an update for 11.4 and 12.1 after it is checked in into factory. > Please have a look at the decline-message in the factory-submission. > For the 11.4 update I'll provide a SWAMP-ID Hallo Benjamin, I do not understood why you declined the Bin's request - one would expect that update by adding a patch is a preferred workflow for maintenance update. The Factory update is different, but because I have all suse additions in pm-utils-suse (and have a plan to rebase it completelly), so for Factory I've merged all stuff here. So please accept the 107316 as I see nothing bad (well, convert of VTxx patch is not really needed, so here I would expect some problems) This is an autogenerated message for OBS integration: This bug (749031) was mentioned in https://build.opensuse.org/request/show/107518 12.1 / pm-utils https://build.opensuse.org/request/show/107519 Factory / pm-utils resubmit with swampid information. 12.1 and 11.4.
107532 State:new By:BinLi When:2012-02-29T11:53:13
submit: home:BinLi:branches:openSUSE:11.4:Update:Test/pm-utils -> openSUSE:11.4:Update:Test
Descr: fix script 50rcnetwork error and update savestate/restorestate
functions(bnc#749031,swampid#45819).
107518 State:review By:BinLi When:2012-02-29T10:40:11
submit: home:BinLi:branches:openSUSE:12.1:Update/pm-utils -> openSUSE:12.1:Update:Test
Review by Group is new: maintenance-opensuse.org
Descr: fix script 50rcnetwork error and update savestate/restorestate
functions(bnc#749031,swampid#45819).
This is an autogenerated message for OBS integration: This bug (749031) was mentioned in https://build.opensuse.org/request/show/107532 11.4 / pm-utils This is an autogenerated message for OBS integration: This bug (749031) was mentioned in https://build.opensuse.org/request/show/107546 11.4 / pm-utils Update for 11.4 and 12.1 already started. Thanks for the submission again and I will remove the needinfo. Update released for: pm-utils, pm-utils-debuginfo, pm-utils-debugsource, pm-utils-ndiswrapper Products: openSUSE 11.4 (debug, i586, x86_64) moved to the new maintainer Anyway, it should be closed now. This is an autogenerated message for OBS integration: This bug (749031) was mentioned in https://build.opensuse.org/request/show/120703 Factory / pm-utils |
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 1. functions dhcp_clients, save_state and restore_state are missing from the package or the 11.4 distribution so this script cannot work as supposed to. 2.command_exists dhcp_clients || exit $NA Early in the script this test will make you exit. So nothing will be processes for Networkmanager or ifup/ifdown setups. 3. [ x"${NETWORKMANAGER}" -eq x"yes" ] && exit $NA If you compare strings you need to use "=", not "-eq". Reproducible: Always Steps to Reproduce: 1.suspend to disk 2.ressume from disk 3. => no wlan0 8-( I have a desktop with a wireless main connection (wlan0) set up with ifdown/ifup because the box needs to function as a network server at home. In stead of shutting down I use "suspend to disk" which functionally works great. Ofcourse, the scripts need to be correct to realy enjoy it. It's easily fixed but as of now if breaks a main feature. So please give this priority as it makes Linux and Opensuse look bad.