Bug 800817 - NETWORKMANAGER=yes/no is gone in in favour of network.service alias link
Summary: NETWORKMANAGER=yes/no is gone in in favour of network.service alias link
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Installation (show other bugs)
Version: 13.1 Beta 1
Hardware: All SUSE Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Stephan Kulow
QA Contact: Jiri Srain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-28 14:52 UTC by Marius Tomaschewski
Modified: 2013-02-06 19:39 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marius Tomaschewski 2013-01-28 14:52:28 UTC
kiwi-config-openSUSE.spec is still using NETWORKMANAGER=yes/no, e.g. in
the spec file:

  if test $desktop = x11; then
     echo 'baseUpdateSysConfig /etc/sysconfig/network/config NETWORKMANAGER no' >> config.sh
  else
     echo 'baseUpdateSysConfig /etc/sysconfig/network/config NETWORKMANAGER yes' >> config.sh
  fi

The code behind needs to be adopted to something like:

  if test $desktop = x11; then
      systemctl -f enable NetworkManager.service || :
  else
      systemctl disable NetworkManager.service || :
  fi


+++ This bug was initially created as a clone of Bug #800771 +++

Created an attachment (id=522207)
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.
Comment 1 Marius Tomaschewski 2013-01-28 15:45:44 UTC
IMO it should be:

if test $desktop = x11; then
    echo "/bin/systemctl -f enable NetworkManager.service" >> config.sh
else
    echo "/bin/systemctl disable NetworkManager.service"   >> config.sh
fi
Comment 2 Marius Tomaschewski 2013-01-29 10:44:28 UTC
Ahm maintainer of kiwi-config-openSUSE is Stephan, not Marcus...

The above were at least another ways around when not wrong.

The complete kiwi-config-openSUSE is about 12.2 until now. I've no idea
where are the 12.3 live-cd configs. The change exists since 12.3.

Stephan?
Comment 3 Marius Tomaschewski 2013-01-31 15:19:07 UTC
I see, that the 12.3 package seems to be in openSUSE:12.3:Live.
I've applied the change to OBS/home:mtomaschewski:tests/kiwi-config-openSUSE.

But perhaps it is better to use a systemd preset file here?
Comment 4 Marius Tomaschewski 2013-01-31 15:24:09 UTC
Current change:

   if test $desktop = x11; then
-     echo 'baseUpdateSysConfig /etc/sysconfig/network/config NETWORKMANAGER no' >> config.sh
+     echo '/bin/systemctl disable NetworkManager.service' >> config.sh
   else
-     echo 'baseUpdateSysConfig /etc/sysconfig/network/config NETWORKMANAGER yes' >> config.sh
+     echo '/bin/systemctl -f enable NetworkManager.service' >> config.sh
   fi

Alternative change using a preset file:

   if test $desktop = x11; then
-     echo 'baseUpdateSysConfig /etc/sysconfig/network/config NETWORKMANAGER no' >> config.sh
+     echo 'echo "disable NetworkManager.service" > /usr/lib/systemd/system.preset/network.preset' >> config.sh
   else
-     echo 'baseUpdateSysConfig /etc/sysconfig/network/config NETWORKMANAGER yes' >> config.sh
+     echo 'echo "enable NetworkManager.service" > /usr/lib/systemd/system.preset/network.preset' >> config.sh
   fi
Comment 5 Bernhard Wiedemann 2013-01-31 16:00:08 UTC
This is an autogenerated message for OBS integration:
This bug (800817) was mentioned in
https://build.opensuse.org/request/show/150605 12.3 / kiwi-config-openSUSE
Comment 6 Frederic Crozat 2013-01-31 16:01:45 UTC
I don't think using a preset is the right way to do it (presets are only
applied once). Better to use the other solution.
Comment 7 Bernhard Wiedemann 2013-02-01 10:00:17 UTC
This is an autogenerated message for OBS integration:
This bug (800817) was mentioned in
https://build.opensuse.org/request/show/150672 Factory / kiwi-config-openSUSE
https://build.opensuse.org/request/show/150673 Factory / kiwi-config-openSUSE
Comment 8 Stephan Kulow 2013-02-06 19:39:24 UTC
it's in