YaST2 Developers Documentation: Configuration of inetd

Configuration of inetd

include/inetd/dialogs.ycp
Dialogs definitions
  • Petr Hadraba
  • Martin Lazar

This module has an unstable interface.

Imports

  • Inetd
  • Label
  • Package
  • Popup
  • Wizard

Includes

  • inetd/helps.ycp
  • inetd/routines.ycp

Local Variables

Local Functions

local local_users -> list<string>

local users and groups are stored here We create both lists only once - during first EditOrCreateServiceDlg() call.

local local_groups -> list<string>

see local_users.

local iid_to_index -> map

This map is used for (re)selecting table items. This is new inetd GUI improvement! :o) Indexes table items, ie. not counting deleted services.

local index_to_iid -> map

See iid_to_index. This is reverse to iid_to_index. Indexes table items, ie. not counting deleted services.

local table_data -> list<term>

used for conversion netd_conf to table's format

local indexTable () -> void

This function regenerates index_to_iid and iid_to_index maps

local GetProvidedPackage (term service_info) -> list<string>

This function extracts provided packages (from Inetd::default_conf_*) for selected service. Matches by (service, protocol,"program (package)")

Parameters:
service_info Contains informations about selected service
Return value:
Provided packages
local just_installed -> map <string, any>

Map of the just installed service, this service changes it's name from NI{int} to {int}:/etc/{service_conf} This map is used to find the currently selected service using the names and options of the service. Related to bug 172449. BTW: This module should have been rewritten ages ago! No more hacking, please.

local InstallProvidedPackage (string selected_item) -> symbol

Ensure that a package is installed. Show dialog with packages names provided non-installed service.

Parameters:
selected_item iid from table
Return value:
Status of operation:
 `next: nothing to do, it is installed already
 `auto: will be installed at autoinstall time
 `installed: successfully installed
 `none: cancelled or install error
 
local IidToTerm (string selected_item) -> term

In table_data, find the first item whose id is selected_item

Parameters:
selected_item iid of selected item
Return value:
Service name or nil
local CheckInstallable (string id) -> string

Checks that the package should be installed. In normal mode, only for xinetd, for services thast are NI. In auto mode, check IsInstalled. otherwise screams nil.

Parameters:
id a ui table item
Return value:
the same item or nil
local InetdDialog () -> symbol

This is main inetd module dialog.

Return value:
dialog result
local EditOrCreateServiceDlg (string title, service_t line) -> service_t

Edit or create an entry

Parameters:
title title specifies the dialog name
line line specifies new entry data-template
Return value:
nil on Cancel or new entry (map) for netd_conf on OK: