Bug 863707 - network service start tries to activate all wireless connections
network service start tries to activate all wireless connections
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-10-06 15:28 EDT by John L Magee
Modified: 2014-03-16 23:32 EDT (History)
8 users (show)

See Also:
Fixed In Version: initscripts-9.45-1.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-03-15 10:41:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description John L Magee 2012-10-06 15:28:44 EDT
Description of problem: when both network and NetworkManager are enabled, the network service attempts to acivate all devices without ONBOOT=no including wireless devices named Auto_.. created by NetworkManager representing SSIDs that are not present. This wreaks havoc with start up of laptop.

Version-Release number of selected component (if applicable): 

How reproducible: 

Steps to Reproduce:
1. have several NM created wireless devices
2. enable network service
3. reboot system
Actual results: network service forces NetworkManager to attempt to activate every wireless connection in /etc/sysconfig/network-scripts/ifcfg-*

Expected results: ignore wireless connections and let NetworkManager activate the one present.

Additional info: This started happening sometime in life of F16. I've generally disabled wireless with switch on laptop during boot. 

Today I added NM_CONTROLLED=yes to all these devices and added this to /etc/init.d/network just before the ONBOOT check and it works like a charm

if LANG=C grep -EL "^NM_CONTROLLED=['\"]?[Yy][Ee][Ss]['\"]?" ifcfg-$i > /dev/null ; then
   # ignore Network Manager Controlled devices
Comment 1 Lukáš Nykrýn 2013-03-13 11:49:01 EDT
I am not sure that it is wise to skip all ifcgs with NM_CONTROLLED. They are handled with network script, when NM is not present. Maybe we should just skip calling nmcli of wireless devices on boot.

Untested patch:
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index f931dd8..53decee 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -66,6 +66,9 @@ then
 if [ "$_use_nm" = "true" -a -n "$UUID" ]; then
+    if [ "foo$2" = "fooboot" ] && [ "${TYPE}" = "Wireless" ]
+        exit 0
+    fi
     nmcli con up uuid "$UUID"
     exit $?
Comment 2 Bill Nottingham 2013-03-13 12:03:26 EDT
This would cause different behavior between the case when NM is enabled and when it isn't. That's probably OK, though.
Comment 3 Lukáš Nykrýn 2013-03-13 12:25:26 EDT
I don't think that this difference will be a problem for someone.

Just please note that there is a small typo in my patch, there is missing "then"
+    if [ "foo$2" = "fooboot" ] && [ "${TYPE}" = "Wireless" ]; then
Comment 4 Lukáš Nykrýn 2013-03-14 08:15:44 EDT
Patch committed upstream.

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