[yast-devel] Solution for bug #798348

I have been studying in yast-network the module Lan.ycp to find a solution for bug #798348. The problem is in line 570 which reads: Service::Reload("network"); This results in a bash command: /usr/bin/systemctl reload network.service However reload for network.service is not available. The solution is already in the release notes for 12.3. The network must first be stopped using: /usr/bin/systemctl is-active network.service && /usr/bin/systemctl stop network.service Depending on a change in the management method, Traditional or NetworkManager NetworkManager.service must be disabled or enabled. After that the network.service must be started. I could not find how to know if the method has been changed when arriving at the above call and in what direction. When the direction of the change is passed as a parameter in this call the changes in Reload are obvious if Reload is not used elsewhere. Otherwise a new routine needs to be defined with the above content. -- fr.gr. Freek de Kruijf -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org

В Sun, 03 Mar 2013 17:51:19 +0100 Freek de Kruijf <f.de.kruijf@gmail.com> пишет:
I have been studying in yast-network the module Lan.ycp to find a solution for bug #798348. The problem is in line 570 which reads:
Service::Reload("network");
This results in a bash command:
/usr/bin/systemctl reload network.service
However reload for network.service is not available. The solution is already in the release notes for 12.3. The network must first be stopped using:
And it must be stopped *before* switching. It must be old service, not new.
/usr/bin/systemctl is-active network.service && /usr/bin/systemctl stop network.service
Depending on a change in the management method, Traditional or NetworkManager
NetworkManager.service must be disabled or enabled. After that the network.service must be started.
I could not find how to know if the method has been changed when arriving at the above call and in what direction. When the direction of the change is passed as a parameter in this call the changes in Reload are obvious if Reload is not used elsewhere. Otherwise a new routine needs to be defined with the above content.
If at the point where Reload is called service has already been switched, it is too late. It has to be done before. Stop old service Switch definitions Start new service -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org

Op maandag 4 maart 2013 06:47:28 schreef Andrey Borzenkov:
If at the point where Reload is called service has already been switched, it is too late. It has to be done before.
Stop old service Switch definitions Start new service
I used module network of YaST to change only the method from Traditional to NetworkManager. YaST did the wrong thing, the reload. I used the commands to make the change effective and I saw immediately after that the icon of the applet appear on my desktop. The flow in this module is AFAIK that when method NetworkManager is active, you can't make any change, except the change in the method to Traditional. So when you do that you can change the configuration for the method. But this configuration is not active because it is not used by the still active NetworkManager, which has a completely separate configuration, right? So when leaving the module you can stop the old service, switch the definitions, and start the new service, right? BTW. At line 526 in Lan.ycp there is the following call for a bash script /usr/lib/NetworkManager/nm-opensuse-sysconfig-merge --connections however I could not find this script on my system. Does it never get called? -- fr.gr. Freek de Kruijf -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
participants (2)
-
Andrey Borzenkov
-
Freek de Kruijf