File: DebianNet.3pm

package info (click to toggle)
netbase 3.11-1.2
  • links: PTS
  • area: main
  • in suites: slink
  • size: 2,764 kB
  • ctags: 2,400
  • sloc: ansic: 25,540; sh: 1,090; makefile: 888; perl: 317
file content (111 lines) | stat: -rw-r--r-- 3,425 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
.\" Copyright 1995 Peter Tobias <tobias@et-inf.fho-emden.de>
.\" May be distributed under the GNU General Public License
.TH DebianNet 3pm "21 September 1995" "Linux" "Linux Programmer's Manual"
.SH NAME
DebianNet.pm \- create, remove, enable or disable entry
in /etc/inetd.conf

.SH SYNOPSIS
.B require DebianNet;

.B DebianNet::add_service($newentry, $group);

.B DebianNet::remove_service($entry);

.B DebianNet::enable_service($service, $pattern);

.B DebianNet::disable_service($service, $pattern);


.SH DESCRIPTION
You can use the functions in
.B DebianNet.pm
to to add, remove, enable or disable entries in the
.IR /etc/inetd.conf
file. After the
.IR /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
.IR /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
.B update\-inetd
command. See
.BR update\-inetd (8)
for further information.

.SH VARIABLES
.TP
.I $DebianNet::inetdcf = \*(rqFILENAME";
Use FILENAME instead of
.IR /etc/inetd.conf
(e.g. for testing purposes).

.TP
.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.

.TP
.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.

.TP
.I $DebianNet::verbose = \*(rqtrue";
Explain what is being done.

.SH FUNCTIONS
.TP
.I DebianNet::add_service($newentry, $group);
Add $newentry to the group $group of the
.IR /etc/inetd.conf
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.

.TP
.I DebianNet::remove_service($entry);
Remove $entry from
.IR /etc/inetd.conf
\&. You can use a regular expression to remove the entry.

.TP
.I DebianNet::enable_service($service, $pattern);
Enable $service (e.g. \*(rqftp") in
.IR /etc/inetd.conf
\&. 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
.IR /etc/inetd.conf
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).

.TP
.I DebianNet::disable_service($service, $pattern);
Disable SERVICE (e.g. \*(rqftp") in
.IR /etc/inetd.conf
\&. Using $pattern is optional (see above).


.SH AUTHORS
Peter Tobias, <tobias@et\-inf.fho\-emden.de>
.br
Ian Jackson <iwj10@cus.cam.ac.uk>