Linux Programmer’s Manual
DebianNet.pm − create, remove, enable or disable entry in /etc/inetd.conf
You can use the functions in DebianNet.pm to to add, remove, enable or disable entries in the
/etc/inetd.conf file. After the /etc/inetd.conf file has been changed, a SIGHUP signal will be sent to the inetd
process to make sure that inetd will use the new /etc/inetd.conf 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 update−inetd command. See update−inetd(8) for further informa-
$DebianNet::inetdcf = ”FILENAME";
Use FILENAME instead of /etc/inetd.conf (e.g. for testing purposes).
$DebianNet::sep = ”#<off># ”;
”#<off># ” will be used as the default comment characters. You can use this option to specify dif-
ferent comment characters. This is only necessary if you have to deal with two (or more) services
of the same name.
$DebianNet::multi = ”true";
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 warn-
ing and asks the user if he want to continue.
$DebianNet::verbose = ”true";
Explain what is being done.
Add $newentry to the group $group of the /etc/inetd.conf file. If the entry already exist it will be
enabled (it will also detect e