Git init
[framework/connectivity/netbase.git] / DebianNet.3pm
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"
4 .SH NAME
5 DebianNet.pm \- create, remove, enable or disable entry
6 in /etc/inetd.conf
7
8 .SH SYNOPSIS
9 .B require DebianNet;
10
11 .B DebianNet::add_service($newentry, $group);
12
13 .B DebianNet::remove_service($entry);
14
15 .B DebianNet::enable_service($service, $pattern);
16
17 .B DebianNet::disable_service($service, $pattern);
18
19
20 .SH DESCRIPTION
21 You can use the functions in
22 .B DebianNet.pm
23 to to add, remove, enable or disable entries in the
24 .IR /etc/inetd.conf
25 file. After the
26 .IR /etc/inetd.conf
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
29 .IR /etc/inetd.conf
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.
35
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.
39
40  For shell scripts you can also use the
41 .B update\-inetd
42 command. See
43 .BR update\-inetd (8)
44 for further information.
45
46 .SH VARIABLES
47 .TP
48 .I $DebianNet::inetdcf = \*(rqFILENAME";
49 Use FILENAME instead of
50 .IR /etc/inetd.conf
51 (e.g. for testing purposes).
52
53 .TP
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.
59
60 .TP
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.
66
67 .TP
68 .I $DebianNet::verbose = \*(rqtrue";
69 Explain what is being done.
70
71 .SH FUNCTIONS
72 .TP
73 .I DebianNet::add_service($newentry, $group);
74 Add $newentry to the group $group of the
75 .IR /etc/inetd.conf
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.
80
81 .TP
82 .I DebianNet::remove_service($entry);
83 Remove $entry from
84 .IR /etc/inetd.conf
85 \&. You can use a regular expression to remove the entry.
86
87 .TP
88 .I DebianNet::enable_service($service, $pattern);
89 Enable $service (e.g. \*(rqftp") in
90 .IR /etc/inetd.conf
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
94 .IR /etc/inetd.conf
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
98 matches this entry).
99
100 .TP
101 .I DebianNet::disable_service($service, $pattern);
102 Disable SERVICE (e.g. \*(rqftp") in
103 .IR /etc/inetd.conf
104 \&. Using $pattern is optional (see above).
105
106
107 .SH AUTHORS
108 Peter Tobias, <tobias@et\-inf.fho\-emden.de>
109 .br
110 Ian Jackson <iwj10@cus.cam.ac.uk>
111