Bug 800771

Summary: NETWORKMANAGER=yes/no is gone in in favour of network.service alias link
Product: [openSUSE] openSUSE Tumbleweed Reporter: Marius Tomaschewski <mt>
Component: Release NotesAssignee: Karl Eichwalder <ke>
Status: RESOLVED FIXED QA Contact: Stephan Kulow <coolo>
Severity: Normal    
Priority: P3 - Medium CC: fcrozat, mfilka, ms
Version: 13.1 Beta 1   
Target Milestone: ---   
Hardware: All   
OS: SUSE Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: network-service-switch.sh: illustration script

Description Marius Tomaschewski 2013-01-28 10:51:44 UTC
Created attachment 522207 [details]
network-service-switch.sh: illustration script

The NETWORKMANAGER=yes/no variable /etc/sysconfig/network/config
has been replaced with the use of network.service alias link,
which is created while "systemctl enable".

The enabled service masks the LSB /etc/init.d/network script as
provided by sysconfig using the following addition in its systemd
service file:

 [Install]
+Alias=network.service


The service name providing the network.sevice alias is visible in
the "Id" systemctl property or it shows "network.service" as "Id"
when the /etc/init.d/network is used:


    # systemctl --no-pager -p Id show network.service
    Id=network.service


To enable the NetworkManager, use:

  - stop the running service
    # systemctl                  is-active network.service && \
      systemctl                  stop      network.service

  - enable the NetworkManager service:

    # systemctl --force          enable NetworkManager.service

  - just to show the Id again:

    # systemctl --no-pager -p Id show   network.service
    Id=NetworkManager.service

  - start the new network service

    # systemctl                  start  network.service


To disable the service masking /etc/init.d/network, use:

  - query currently active service Id:

    # Id=`systemctl -p Id --no-pager show network.service 2>/dev/null`
    # echo "${Id#Id=}"
    NetworkManager.service

  - stop the network service:

    # systemctl                  stop   network.service

  - disable the active NetworkManager.service:

    # systemctl disable "${Id#Id=}.service"

  - start the network service (/etc/init.d/network):

    # systemctl                  start  network.service
Comment 1 Marius Tomaschewski 2013-01-28 10:58:57 UTC
The adopted packages are on the way to factory via following requests:

OBS Request 149830: sysconfig
OBS Request 149827: NetworkManager
OBS Request 149901: netcontrol

Further request are in github and gitorious:

https://github.com/yast/yast-yast2/pull/44
https://github.com/yast/yast-network/pull/47

https://gitorious.org/opensuse/pm-utils-suse/merge_requests/1


Test packages containing these adoptions are in:

http://download.opensuse.org/repositories/home:/mtomaschewski:/tests/openSUSE_Factory/

See also bnc#764055,bnc#764336,bnc#798348,bnc#800365.
Comment 2 Marius Tomaschewski 2013-01-28 11:02:10 UTC
(In reply to comment #0)
>   - disable the active NetworkManager.service:
> 
>     # systemctl disable "${Id#Id=}.service"

Here of course only:
      # systemctl disable "${Id#Id=}"

that is basically:
      # systemctl disable NetworkManager.service

See also attached network-service-switch.sh illustration script.
Comment 3 Karl Eichwalder 2013-01-30 07:28:50 UTC
Thanks, fixed in SVN (I'll publish it tomorrow).
Comment 4 Karl Eichwalder 2013-01-31 13:06:18 UTC
osc sr -m'update for 12.3'
created request id 150570