
functions
files
intro
|
|
Network configuration |
modules/NetworkModules.ycp |
Hardware config manipulation (/etc/sysconfig/hardware/hwcfg-*) |
|
|
The new sysconfig naming is interface (eg. eth0) vs. device
(eg. NE2000 card), but historically yast has called them device
vs. module.
This module is a big mess because originally it was intended to
have similar structure to NetworkDevices, with config files
categorized in two levels [type, id], but now there is just one
level. Lots of code is just copied and unused.
Imports
Includes
- network/complex.ycp
- network/routines.ycp
Global Variables
Global Functions
Local Variables
Local Functions
|
|
|
Current module identifier
- Example:
-
Alias means Driver here (think of modules.conf)
Current module information
- Example:
-
$["BOOTPROTO":"dhcp", "STARTMODE":"onboot"] |
local Modules -> map<string,map>
|
|
Modules information
- See:
-
local OriginalModules -> map<string,map>
|
|
Modules information
- See:
-
local Deleted -> list<string>
|
|
Deleted modules
local initialized -> boolean
|
|
True if modules are already read
global Read () -> boolean
|
|
Read modules from files
- Return value:
local Filter (map<string,map> modules, string devregex) -> map
|
|
- Parameters:
local FilterNOT (map<string,map> modules, string devregex) -> map
|
|
- Parameters:
local MapMinus (map left, map right) -> list
|
|
One-way difference of two maps. Take away the identical items.
- Parameters:
left |
left map |
right |
right map |
- Return value:
|
the keys of left which are not in right or whose values are
not equal in the two maps. |
global Write (string devregex) -> boolean
|
|
Write modules to files
And also do hwdown before and hwup after, on changed ones (#44794)
- Parameters:
devregex |
regular expression for the module type |
- Return value:
- Example:
-
NetworkModule::Write("eth|tr"); |
global Import (string devregex, map<string,map> modules) -> boolean
|
|
Import data
- Parameters:
- Return value:
global Export (string devregex) -> map<string,map>
|
|
Export data
- Parameters:
- Return value:
|
dumped settings (later acceptable by Import()) |
global Modified (string devregex) -> boolean
|
|
Were the modules changed?
- Parameters:
- Return value:
local Check (string dev) -> boolean
|
|
Check presence of the module (alias)
- Parameters:
- Return value:
|
true if module is present |
global Select (string name) -> boolean
|
|
Select the given module
- Parameters:
- Return value:
Add a new module
- Return value:
global Edit (string name) -> boolean
|
|
Edit the given module
- Parameters:
- Return value:
global Delete (string name) -> boolean
|
|
Delete the given module
- Parameters:
- Return value:
local Change2 (string name, map newdev, boolean check) -> boolean
|
|
Update Modules map
- Parameters:
name |
|
newdev |
new module map |
check |
if check if module already exists |
- Return value:
global Locate (string key, string val) -> list
|
|
Locate modules of the given type and value
- Parameters:
key |
module key |
val |
module value |
- Return value:
global LocateProvider (string provider) -> boolean
|
|
Check if any module is using the specified provider
- Parameters:
provider |
provider identification |
- Return value:
global UpdateModemSymlink () -> boolean
|
|
Update /dev/modem symlink
- Return value:
global CleanHotplugSymlink () -> boolean
|
|
Clean the hotplug modules compatibility symlink,
usually ifcfg-eth-pcmcia -> ifcfg-eth-pcmcia-0.
- Return value:
global List (string devregex) -> list
|
|
Get modules of the given type
- Parameters:
- Return value:
|