.\" Copyright 1995 Peter Tobias <firstname.lastname@example.org>
.\" May be distributed under the GNU General Public License
.TH DebianNet 3pm "21 September 1995" "Linux" "Linux Programmer's Manual"
DebianNet.pm \- create, remove, enable or disable entry
.B require DebianNet;
.B DebianNet::add_service($newentry, $group);
.B DebianNet::enable_service($service, $pattern);
.B DebianNet::disable_service($service, $pattern);
You can use the functions in
to to add, remove, enable or disable entries in the
file. After the
file has been changed, a SIGHUP signal will be sent to the
inetd process to make sure that inetd will use the new
file. The functions can also be used to add entries that
are commented out by default. They will be treated like
normal entries. That also means that if you already have
an entry that is commented out you can't add an entry for
the same service without removing the old one first.
The DebianNet functions treat entries that are commented out
by a single '#' character as entries that have been commented
out by a user. It won't change such entries.
For shell scripts you can also use the
.BR update\-inetd (8)
for further information.
.I $DebianNet::inetdcf = \*(rqFILENAME";
Use FILENAME instead of
(e.g. for testing purposes).
.I $DebianNet::sep = \*(rq#<off>#\ \*(rq;
\*(rq#<off>#\ \*(rq will be used as the default comment characters.
You can use this option to specify different comment characters.
This is only necessary if you have to deal with two (or more)
services of the same name.
.I $DebianNet::multi = \*(rqtrue";
If you want to disable/remove more than one entry at a time
you should use this option. If you try to remove more than one
entry at a time without using this option the program will show
a warning and asks the user if he want to continue.
.I $DebianNet::verbose = \*(rqtrue";
Explain what is being done.
.I DebianNet::add_service($newentry, $group);
Add $newentry to the group $group of the
file. If the entry already exist it will be enabled (it will also
detect entries with different program options). Using $group
is optional (the default group is the group OTHER). If the group
does not exist the entry will be placed at the end of the file.
Remove $entry from
\&. You can use a regular expression to remove the entry.
.I DebianNet::enable_service($service, $pattern);
Enable $service (e.g. \*(rqftp") in
\&. Using $pattern is optional. It can be used to select a service.
You only need this option if you have two (or more) services of
the same name. An example: you have three ftp entries in the
file (all disabled by default) and you want to enable the entry
which uses the wu-ftpd daemon. To do this, use
the pattern \*(rqwu-ftpd" (or any other regular expression that
matches this entry).
.I DebianNet::disable_service($service, $pattern);
Disable SERVICE (e.g. \*(rqftp") in
\&. Using $pattern is optional (see above).
Peter Tobias, <tobias@et\-inf.fho\-emden.de>
Ian Jackson <email@example.com>