YaST2 Developers Documentation: Configuration of inetd | ![]() |
![]() functions files intro |
Structure service A service map looks like this: $[ * as seen on TV^H^H (x)inetd.conf: "service": string // * different from equally named field above "rpc_version": string "socket_type": string "protocol": string "wait": boolean "max": integer // inetd only "user": string // * "group": string "server": string "server_args": string "comment": string // possibly multiline, without # "enabled": boolean // service is active * bookkeeping fields: "iid": string // internal id, use as table `id // Iid is necessary because there may be multiple variants // of the same service. See next for iid handling. "changed": boolean // when writing, unchanged services are ignored // new services (created) must be set as changed // see changeLine() and see addLine() for more details "deleted": boolean // when deleting, this is set to TRUE and changed // must be set too (see deleteLine()) "script": string // which configuration file this comes from "package": string // which rpm it is in * other fields: When handling existing maps, take care to preserve any other fields that may be present! "unparsed": string // what the agent could not parse ] path netd = .whatever.inetd or .whatever.xinetd; SCR::Read (.etc.inetd_conf.services) -> list of inetd configuration SCR::Read (.etc.xinetd_conf.services) -> list of xinetd configuration SCR::Write (.etc.inetd_conf.services, list) -> boolean SCR::Write (.etc.xinetd_conf.services, list) -> boolean "iid" handling: The agent (ag_netd) uses it to locate the service in the config files. Its value should be considered opaque, except that ag_netd will check whether it contains a colon (:) and if not, consider it a new service. Thus new services get "new"+number. Non-installed services: in normal ui they appear only in the table and get "NI"+number in autoyast ui they get "inst"+number Where number is last_created
What service is in configuration process? Same values as netd_service except `both
Default configuration for inetd (all services in the distro)
Default configuration for xinetd (all services in the distro)
Abort function return boolean return true if abort
Abort function
Configuration was changed
used in unused module inetd_proposal.ycp. This will be removed
For autoinstallation Write() process. Write_only means that the service will not be actually started, because it is done by init later. But also that the service data are only a patch to be applied to the system.
If autoinstallation mode (true), we do not want to install RPMs during configuration. Otherwise (false) we allow all.
Data was modified? This function returnes modified variable.
hold informations about installed services (rpm -q exit code).
0 means installed, anything else means no or error
xinetd_installed contains info about xinetd
What service is ready for configuration?
These variable holds inetd configuration. This is list of maps. Each map has the following structure: $[ "comment": String, "comment_inside": String, // this is agent internal "enabled": boolean, "group": String, "user": String, "iid": String, "protocol": String, "rpc_version": String, "server": String, "server_args": String, "service": String, "socket_type": String, "unparsed": String, // agent internal "wait": boolean ]
This variable holds xinetd configuration. The structure is the same as inetd_conf.
Holds configuration of selected service (service in configuration process). The name of this service is stored in configured_service. Structure of this variable is the same as inetd_conf or xinetd_conf.
Holds default configuration for currently edited superserver.
Is inetd (or xinetd) running? These variables contains return values from Service::Status() calls.
This contains return value of following call:
Status of edited service (see WhatToConfigureDialog() in dialogs.ycp) Values are the same as (x)inetd_status.
Status of inetd module if autoinstallation mode.
Used in Summary.
This is the state of whole module. This variable is filled by Import().
Possible values are
This variable is used for new iid "generator"
Read default_conf_{inetd,xinetd}, if not already done
Read all inetd settings
This function solves differences between new (after installing requested packages) xinetd configuration and the configuration edited by the user. In normal mode: take the system services if it matches a service in the ui (ServicesMatch) use the ui data (not-installed ones are not a part of netd_conf, they only enter the table in mergexinetdconfs) Deleted services: OK. Added services: a separate pass neededTODO reduce the quadratic complexity.
Write all inetd settings
Only Write settings
Merges autoinstall profile into the system configuration.
merges imported changes with services defaults
Removes keys from a map. Unlike the remove builtin, does not mind if the keys are already removed.
Merges AY profile items into a target list (defaults or system).
Convert from SLES8 AI profile
Get all inetd settings from the first parameter (For use by autoinstallation.)
Get only changed entries
Dump the inetd settings to a single map (For use by autoinstallation.)
Create unsorted list of enabled services
Create a textual summary and a list of unconfigured cards
delete line in netd_conf
add a line in DB
Change a line in DB
Return required packages for auto-installation FIXME: Need to make this return the needed packages during installation
|
YaST2 Developers Documentation | ![]() |