YaST2 Developers Documentation: Unknown YCP Module

Unknown YCP Module

This module has an unstable interface.

Imports

  • Mode
  • NetworkConfig
  • Popup
  • Service

Global Functions

Local Variables

Local Functions

Info:

File: modules/NetworkService.ycp Package: Network configuration Summary: Init script handling, ifup vs NetworkManager Authors: Martin Vidner

$Id$

This module used to switch between /etc/init.d/network providing LSB network.service and the NetworkManager.service (or another), which installs a network.service alias link.

The service name installing the network.sevice is visible in the "Id" systemctl property:

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

local initialized -> boolean

if false, read needs to do work

local cur_service_id_name -> string

current network service id name

local new_service_id_name -> string

the new network service id name

local systemctl -> string

Path to the systemctl command

local RunSystemCtl (string service, string action) -> integer

Helper to run systemctl actions

Parameters:
service
action
Return value:
exit code
global Modified () -> boolean

Whether a network service change were requested

Return value:
true when service change were requested
global IsManaged () -> boolean

Whether use NetworkManager or ifup

Return value:
true when the network is managed, false when the /etc/init.d/network script is in use.
global SetManaged (boolean m) -> void

Parameters:
m whether networkmanager will be used
global Read () -> void

Initialize module data

global EnableDisable () -> void

Enables and disables the appropriate services.

global IsActive () -> boolean

Reports if network service is active or not. It does not report if network is connected.

Return value:
true when network service is active
global ReloadOrRestart () -> void

Reload or restars the network service.

global Restart () -> void

Restarts the network service

global StartStop () -> void

This is an old, confusing name for ReloadOrRestart() now

global ConfirmNetworkManager () -> boolean

Opens up a continue/cancel confirmation popup in the case when NetworkManager is enabled. User is informed that continuing the configuration may produce undefined results. If NetworkManager is not used, silently returns true.

Return value:
continue
global RunningNetworkPopup () -> boolean

If there is network running, return true. Otherwise show error popup depending on Mode and return false

Return value:
true if network running