1 .\" Copyright 1995 Peter Tobias <tobias@et-inf.fho-emden.de>
2 .\" May be distributed under the GNU General Public License
3 .TH DebianNet 3pm "21 September 1995" "Linux" "Linux Programmer's Manual"
5 DebianNet.pm \- create, remove, enable or disable entry
11 .B DebianNet::add_service($newentry, $group);
13 .B DebianNet::remove_service($entry);
15 .B DebianNet::enable_service($service, $pattern);
17 .B DebianNet::disable_service($service, $pattern);
21 You can use the functions in
23 to to add, remove, enable or disable entries in the
27 file has been changed, a SIGHUP signal will be sent to the
28 inetd process to make sure that inetd will use the new
30 file. The functions can also be used to add entries that
31 are commented out by default. They will be treated like
32 normal entries. That also means that if you already have
33 an entry that is commented out you can't add an entry for
34 the same service without removing the old one first.
36 The DebianNet functions treat entries that are commented out
37 by a single '#' character as entries that have been commented
38 out by a user. It won't change such entries.
40 For shell scripts you can also use the
44 for further information.
48 .I $DebianNet::inetdcf = \*(rqFILENAME";
49 Use FILENAME instead of
51 (e.g. for testing purposes).
54 .I $DebianNet::sep = \*(rq#<off>#\ \*(rq;
55 \*(rq#<off>#\ \*(rq will be used as the default comment characters.
56 You can use this option to specify different comment characters.
57 This is only necessary if you have to deal with two (or more)
58 services of the same name.
61 .I $DebianNet::multi = \*(rqtrue";
62 If you want to disable/remove more than one entry at a time
63 you should use this option. If you try to remove more than one
64 entry at a time without using this option the program will show
65 a warning and asks the user if he want to continue.
68 .I $DebianNet::verbose = \*(rqtrue";
69 Explain what is being done.
73 .I DebianNet::add_service($newentry, $group);
74 Add $newentry to the group $group of the
76 file. If the entry already exist it will be enabled (it will also
77 detect entries with different program options). Using $group
78 is optional (the default group is the group OTHER). If the group
79 does not exist the entry will be placed at the end of the file.
82 .I DebianNet::remove_service($entry);
85 \&. You can use a regular expression to remove the entry.
88 .I DebianNet::enable_service($service, $pattern);
89 Enable $service (e.g. \*(rqftp") in
91 \&. Using $pattern is optional. It can be used to select a service.
92 You only need this option if you have two (or more) services of
93 the same name. An example: you have three ftp entries in the
95 file (all disabled by default) and you want to enable the entry
96 which uses the wu-ftpd daemon. To do this, use
97 the pattern \*(rqwu-ftpd" (or any other regular expression that
101 .I DebianNet::disable_service($service, $pattern);
102 Disable SERVICE (e.g. \*(rqftp") in
104 \&. Using $pattern is optional (see above).
108 Peter Tobias, <tobias@et\-inf.fho\-emden.de>
110 Ian Jackson <iwj10@cus.cam.ac.uk>