Network Services (inetd) - YaST2 configuration module
module inside
$Id: inside.html,v 1.2 2003/04/09 16:11:43 phadraba Exp $
Martin Vidner
Petr Hadraba
Workflow
Main scheme - main sequence
packages(PackageDialog()) -> read(ReadDialog())
-> main(InetdDialog()) -> write(WriteDialog())
Note: The `->' means, that previews step terminates successfuly.
Package detection, installation - PackageDialog()
This dialog obtains status of installed packages (inetd or xinetd). The
status is stored into Inetd::inetd_installed and Inetd::xinetd_installed.
Used functions are GetInetdInstalled() and GetXinetdInstalled()
in routines.ycp. I'm using `rpm -q [package_name]
2>&1 > /dev/nul' called with
SCR::Execute(.target.bash, ... ).
If no packages are installed, the dialog is displayed for user choice,
what to install. Note, that only one package of inetd or xinetd is
installed, the dialog is skipped.
PackageDialog() fills Inetd::netd_service (`inetd,`xinetd,`both),Inetd::inetd_status
(with GetInetdStatus()), Inetd::xinetd_status (with GetXinetdStatus()).
If only one service (inetd or xinetd) is installed, the Inetd::netd_status
is also filled with Inetd::[.*]netd_status.
read - ReadDialog()
ReadDialog() calls Inetd::Read().
Inetd::Read() reads configuration depending on netd_service
value. If inetd and xinetd are installed, both configuration is loaded.
The variables are inetd_conf and xinetd_conf.
Inetd::Read() also initialize xinetd_packages variable
with the following SCR call
SCR::Read(.target.ycp, Direcorty::Datadir +
"/all-services.ycp");
all-services.ycp will be generated during distribution build and
contains informations about packages with services that needs xinetd.
main - InetdDialog()
After reading configuration, main configuration dialog is displayed.
This dialog is implemented in InetdDialog() in dialogs.ycp.
If both services (inetd and xinetd) are installed, the dialog about
what to configure is displayed. This is made by calling WhatToConfigureDialog().
Finally, Inetd::configured_service is filled according to
selected (or installed) service. The configuration of this service is
stored into default variable Inetd::netd_conf.
There is, in new version of YaST2 Inetd module, new feature. Main table
now remeberes last selected item. This feature is implemented in indexTable()
function and iid_to_index and index_to_iid variables.
write - WriteDialog()
WriteDialog() calls Inetd::Write().
Inetd::Write() simply writes configuration and if in
autoinstallation mode, required packages are installed first. After
installing packages, the mergeAfterInstall() function is
called. This function merges new configuration of new packages with
user changes in "old" configuration.