94. Inetd

Data for configuration of inetd, input and output functions.

94.1. Summary of Module Globals

List of Global Functions

  • Abort - Abort function

  • AutoPackages - Return required packages for auto-installation FIXME: Need to make this return the needed packages during installation

  • Export - Dump the inetd settings to a single map (For use by autoinstallation.)

  • Import - Get all inetd settings from the first parameter (For use by autoinstallation.)

  • MergeAyProfile - Merges AY profile items into a target list (defaults or system).

  • MergeEditedWithSystem - This function solves differences between new (after installing requested packages) xinetd configuration and the configuration edited by the user. <pre> <b>In normal mode</b>: 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 needed </pre> TODO reduce the quadratic complexity.

  • Modified - Data was modified? This function returnes modified variable.

  • Read - Read all inetd settings

  • SafeRemove - Removes keys from a map. Unlike the remove builtin, does not mind if the keys are already removed.

  • Summary - Create a textual summary and a list of unconfigured cards

  • Write - Write all inetd settings

  • WriteOnly - Only Write settings

  • addLine - add a line in DB

  • changeLine - Change a line in DB

  • deleteLine - delete line in netd_conf

  • getChanged - Get only changed entries

  • mergeAfterInstall - Merges autoinstall profile into the system configuration.

  • mergeWithDefaults - merges imported changes with services defaults

  • mkeServiceSummary - Create unsorted list of enabled services

List of Global Variables

  • AbortFunction - Abort function return boolean return true if abort

  • auto_mode - If autoinstallation mode (true), we do not want to install RPMs during configuration. Otherwise (false) we allow all.

  • autoyast_initialized - Autoyast now does not initially call Import $[] anymore. But our design is so broken that we need it and will work hard to achieve it.

  • last_created - This variable is used for new iid "generator"

  • modified - Configuration was changed

  • netd_conf - <pre> 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 ] </pre>

  • netd_status - Is xinetd running? These variables contains return values from Service::Status() calls.

  • proposal_valid - used in unused module inetd_proposal.ycp. This will be removed

  • write_only - 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.

94.2. Global Functions

94.2.1. Abort

Abort function

Return value

  • boolean - If AbortFunction not defined, returnes false

94.2.2. AutoPackages

Return required packages for auto-installation FIXME: Need to make this return the needed packages during installation

Return value

  • map - of packages to be installed and to be removed

94.2.3. Export

Dump the inetd settings to a single map (For use by autoinstallation.)

Return value

  • map - Dumped settings (later acceptable by Import ())

94.2.4. Import

Get all inetd settings from the first parameter (For use by autoinstallation.)

Function parameters

  • map settings

Return value

  • boolean - True on success

94.2.5. MergeAyProfile

Merges AY profile items into a target list (defaults or system).

Function parameters

  • services_t target

  • services_t changes

Return value

  • services_t - merged list of services

94.2.6. MergeEditedWithSystem

This function solves differences between new (after installing requested packages) xinetd configuration and the configuration edited by the user. <pre> <b>In normal mode</b>: 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 needed </pre> TODO reduce the quadratic complexity.

Function parameters

  • services_t system_conf

  • services_t edited_conf

Return value

  • services_t - Returnes new solved xinetd configuration (ready for Write()).

94.2.7. Modified

Data was modified? This function returnes modified variable.

Return value

  • boolean - true if modified

94.2.8. Read

Read all inetd settings

Return value

  • boolean - true on success

94.2.9. SafeRemove

Removes keys from a map. Unlike the remove builtin, does not mind if the keys are already removed.

Function parameters

  • map m

  • list keys

Return value

  • map - the map without the specified keys

94.2.10. Summary

Create a textual summary and a list of unconfigured cards

Return value

  • string - summary of the current configuration

94.2.11. Write

Write all inetd settings

Return value

  • boolean - true on success

94.2.12. WriteOnly

Only Write settings

Return value

  • boolean - True on success

94.2.13. addLine

add a line in DB

Function parameters

  • service_t new_line

Return value

  • void

94.2.14. changeLine

Change a line in DB

Function parameters

  • service_t new_line

  • any line_number

Return value

  • void

94.2.15. deleteLine

delete line in netd_conf

Function parameters

  • any line_number

Return value

  • void

94.2.16. getChanged

Get only changed entries

Function parameters

  • services_t config

Return value

  • services_t - Returnse list of changes only

94.2.17. mergeAfterInstall

Merges autoinstall profile into the system configuration.

Function parameters

  • services_t system_c

  • services_t user_c

Return value

  • services_t - Returnes new solved xinetd configuration (ready for Write()).

94.2.18. mergeWithDefaults

merges imported changes with services defaults

Function parameters

  • services_t changes

Return value

  • services_t - complete configuration with user changes

94.2.19. mkeServiceSummary

Create unsorted list of enabled services

Return value

  • string - Returnes string with RichText-formated list

94.3. Global Variables

94.3.1. AbortFunction

Abort function return boolean return true if abort

94.3.2. auto_mode

If autoinstallation mode (true), we do not want to install RPMs during configuration. Otherwise (false) we allow all.

94.3.3. autoyast_initialized

Autoyast now does not initially call Import $[] anymore. But our design is so broken that we need it and will work hard to achieve it.

94.3.4. last_created

This variable is used for new iid "generator"

94.3.5. modified

Configuration was changed

94.3.6. netd_conf

<pre> 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 ] </pre>

94.3.7. netd_status

Is xinetd running? These variables contains return values from Service::Status() calls.

94.3.8. proposal_valid

used in unused module inetd_proposal.ycp. This will be removed

94.3.9. write_only

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.

94.4. Module Requirements

94.4.1. Module Imports

  • Directory
  • Progress
  • Report
  • String
  • Summary
  • XVersion

94.4.2. Module Includes

  • inetd/default_conf_xinetd.ycp
  • inetd/routines.ycp