Bug 749961 - Network manager creates corrupt ifcfg files that prevent OS from suspending
Summary: Network manager creates corrupt ifcfg files that prevent OS from suspending
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: 16
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Dan Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-29 09:06 UTC by Ken
Modified: 2011-11-12 02:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-12 01:13:23 UTC
Type: ---


Attachments (Terms of Use)

Description Ken 2011-10-29 09:06:18 UTC
Description of problem:
When using NetworkManager with a wireless network, it will create ifcfg files in /etc/sysconfig/network-scripts. One file will be created for each access point that is within range. The files contain properties of the access points in the form of: name = value
When suspending the machine, these files are sourced by pm-suspend. The problem is that the values in these files are not quoted, which creates errors when the files are sourced by pm-suspend if the name of the access points contains unusual characters (spaces, symbols). For example, one access point I encountered had the name "Grace C. Waldo", thus in the file "ifcfg-Grace C. Waldo" there was the line:
NAME=Grace C. Waldo
When pm-suspend is run, this file is sources by bash, which gets confused by this line and reports "unknown command: C.".

Network manager should be modified so that it quotes the values in each name/value pair to avoid problems when these files are source by pm-suspend. 

Version-Release number of selected component (if applicable):
NetworkManager.x86_64                 1:0.9.1.90-4.git20110927.fc16

How reproducible:


Steps to Reproduce:
1. Configure an access point with unusual characters in the SID
2. Enable wireless networking
3. Run pm-suspend
  
Actual results:
Will not suspend. Error message in /var/log/pm-suspend.log indicating that there is a error in an ifcfg file in /etc/sysconfig/network-scripts

Expected results:
Computer should suspend without complaint.

Additional info:

Comment 1 Jirka Klimes 2011-11-11 09:21:41 UTC
NetworkManager ifcfg-rh plugin *does* quote values if they contain problematic characters like spaces, etc.

So, I'm  not sure how your ifcfg file got created. Moreover NAME=value is for the name of the connection and not SSID. AP's SSID is stored in ESSID variable and it is also quoted when containing spaces.

Comment 2 Ken 2011-11-11 19:23:45 UTC
Thanks for looking into this. Let me delete the problematic files and see if I can determine what is creating them.

Let me add what may be relevant information before I do in case I forget to mention it later:
1. I am not running gnome. Instead I am managing the wireless networking with nmcli and nm-tool. I did use nm-applet once so that I could enter the passphrase for my WPA2 access point.
2. The files in /etc/sysconfig/network-scripts were system generated, and the SSID was used for both the NAME and ESSID variables, and of course, the files were generated without quotes around the values for these variables.
3. When I started I was using a Fedora16-beta install. I have since been accepting all yum updates on a regular basis.
4. I have little understanding of the internals network-manager.

Comment 3 Ken 2011-11-12 01:12:11 UTC
I tried deleting the problematic network scripts and then running nm-tool, nmcli, nm-applet. I also restarted NetworkManager. Nothing re-creates the network scripts. I was able to recreate the scripts if I tried to connect to the problematic networks with nm-applet, but in this case the values were properly quoted.

In other words, I cannot reproduce this problem. Sorry for wasting your time.


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