YaST2 Developers Documentation: Network configuration



functions
files
intro

Network configuration

include/network/routines.ycp
Miscellaneous routines

Imports

  • Call
  • Popup
  • Progress
  • Require
  • String

Local Functions

local Abort () -> boolean

Abort function

Return value:
blah blah lahjk

local PollAbort () -> boolean

Check for pending Abort press

Return value:
true if pending abort

local ReallyAbort () -> boolean

If modified, ask for confirmation

Return value:
true if abort is confirmed

local ReallyAbortCond (boolean modified) -> boolean

If modified, ask for confirmation

Parameters:
modified true if modified
Return value:
true if abort is confirmed

local ScreenName (string name) -> void

Set screen shot name

Parameters:
name screenshot name

local ProgressNextStage (string title) -> void

Progress::NextStage and Progress::Title combined into one function

Parameters:
title progressbar title

local ChangeWidgetIfExists (term id, symbol param, any value) -> void

Change UI widget only if it exists

Parameters:
id widget id
param widget parameter
value widget parameter value

local QueryWidgetIfExists (term id, symbol param, any value) -> any

Query UI widget only if it exists

Parameters:
id widget id
param widget parameter
value previous parameter value
Return value:
widget value if exists, previous value otherwise

local PackagesInstall (list<string> packages) -> symbol

Check if required packages are installed and install them if they're not

Parameters:
packages list of required packages (["rpm", "bash"])
Return value:
`next if packages installation is successfull, `abort otherwise

local ChangedComment (string modul) -> string

Create comment for changed file

Parameters:
modul YaST2 module changing the file
Return value:
comment
Example:
  ChangedComment("lan") -> # Changed by YaST2 module lan 1.1.2000"

local BusyPopup (string message) -> void

Show busy popup (for proposal)

Parameters:
message label to bw shown

local BusyPopupClose () -> void

Close busy popup

See:
BusyPopup

local list2items (list l, integer selected) -> list

Create a list of items for UI from the given list

Parameters:
l given list for conversion
selected selected item (0 for the first)
Return value:
a list of items
Example:
  [ "x", "y" ] -> [ `item(`id(0), "x"), `item(`id(1), "y") ]

local hwlist2items (list<map> l, integer selected) -> list

Create a list of items for UI from the given hardware list

Parameters:
l given list for conversion
selected selected item (0 for the first)
Return value:
a list of items

local device_type (string dev) -> string

Return a device type

Parameters:
dev device
Return value:
device type
Example:
  device_type("eth1") -> "eth"
  device_type("eth-pcmcia-0") -> "eth-pcmcia"

local device_num (string dev) -> string

Return a device number

Parameters:
dev device
Return value:
device number
Example:
  device_num("eth1") -> "1"
  device_num("lo") -> ""

local alias_num (string dev) -> string

Return a device alias number

Parameters:
dev device
Return value:
alias number
Example:
  alias_num("eth1#2") -> "2"
  alias_num("eth1#blah") -> "blah"

local IsHotplug (string type) -> boolean

Test hotplugability of a device

Parameters:
type device type
Return value:
true if hotpluggable

local device_name (string typ, string num) -> string

Create a device name from its type and number

Parameters:
typ device type
num device number
Return value:
device name
Example:
  device_name("eth", "1") -> "eth1"
  device_name("lo", "") -> "lo"

local alias_name (string typ, string num, string anum) -> string

Create a alias name from its type and numbers

Parameters:
typ device type
num device number
anum alias number
Return value:
alias name
Example:
  alias_name("eth", "1", "2") -> "eth1#2"

local RealType (string type, string hotplug) -> string

Return real type of the device (incl. PCMCIA, USB, ...)

Parameters:
type basic device type
hotplug hot plug type
Return value:
real type
Example:
  RealType("eth", "usb") -> "eth-usb"

local FinishPopup (boolean modified, string head, string text, string run, list params) -> symbol

Display the finished popup and possibly run another module. If not modified, don't do anything.

Parameters:
modified true if there are any modified data
head headline to be shown
text text to be shown
run module to be run
params parameters to pass to the module
Return value:
always `next

YaST2 Developers Documentation