summaryrefslogtreecommitdiff
path: root/usr/src/man/man8/inetconv.8
blob: 48627c329f17e35232a26b0cae4783999bf48df1 (plain)
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
'\" te
.\" Copyright (c) 2004, Sun Microsystems, Inc.
.\" All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH INETCONV 8 "Oct 21, 2004"
.SH NAME
inetconv \- convert \fBinetd.conf\fR entries into smf service manifests, import
them into smf repository
.SH SYNOPSIS
.LP
.nf
\fBinetconv\fR \fB-?\fR
.fi

.LP
.nf
\fBinetconv\fR [\fB-f\fR] [\fB-n\fR] [\fB-i\fR \fIsrcfile\fR] [\fB-o\fR \fIdestdir\fR]
.fi

.LP
.nf
\fBinetconv\fR \fB-e\fR [\fB-n\fR] [\fB-i\fR \fIsrcfile\fR]
.fi

.SH DESCRIPTION
.sp
.LP
The \fBinetconv\fR utility converts a file containing records of
\fBinetd.conf\fR(5) into \fBsmf\fR(7) service manifests, and then import those
manifests into the \fBsmf\fR repository. Once the \fBinetd.conf\fR file has
been converted, the only way to change aspects of an inet service is to use the
\fBinetadm\fR(8) utility.
.sp
.LP
There is a one-to-one correspondence between a service line in the input file
and the manifest generated. By default, the manifests are named using the
following template:
.sp
.in +2
.nf
\fI<svcname>\fR-\fI<proto>\fR\fB\&.xml\fR
.fi
.in -2

.sp
.LP
The \fI<svcname>\fR token is replaced by the service's name and the
\fI<proto>\fR token by the service's protocol. Any slash (\fB/\fR) characters
that exist in the source line for the service name or protocol are replaced
with underscores (\fB_\fR).
.sp
.LP
The service line is recorded as a property of the converted service.
.sp
.LP
During the conversion process, if a service line is found to be malformed or to
be for an internal \fBinetd\fR service, no manifest is generated and that
service line is skipped.
.sp
.LP
The input file is left untouched by the conversion process.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-?\fR\fR
.ad
.RS 14n
Display a usage message.
.RE

.sp
.ne 2
.na
\fB\fB-e\fR\fR
.ad
.RS 14n
Enable \fBsmf\fR services which are listed in the input file.
.RE

.sp
.ne 2
.na
\fB\fB-f\fR\fR
.ad
.RS 14n
If a service manifest of the same name as the one to be generated is found in
the destination directory, \fBinetconv\fR will overwrite that manifest if this
option is specified. Otherwise, an error message is generated and the
conversion of that service is not performed.
.RE

.sp
.ne 2
.na
\fB\fB-i\fR \fIsrcfile\fR\fR
.ad
.RS 14n
Permits the specification of an alternate input file \fIsrcfile\fR. If this
option is not specified, then the \fBinetd.conf\fR(5) file is used as input.
.RE

.sp
.ne 2
.na
\fB\fB-n\fR\fR
.ad
.RS 14n
Turns off the auto-import of the manifests generated during the conversion
process. Later, if you want to import a generated manifest into the
\fBsmf\fR(7) repository, you can do so through the use of the \fBsvccfg\fR(8)
utility.
.sp
If the \fB-e\fR option is specified, the \fB-n\fR option only displays the
\fBsmf\fR services that would be enabled.
.RE

.sp
.ne 2
.na
\fB\fB-o\fR\fR
.ad
.RS 14n
Permits the specification of an alternate destination directory \fIdestdir\fR
for the generated manifests. If this option is not specified, then the
manifests are placed in \fB/var/svc/manifest/network/rpc\fR, if the service is
a RPC service, or \fB/var/svc/manifest/network\fR otherwise.
.RE

.SH EXAMPLES
.LP
\fBExample 1 \fRGenerating \fBsmf\fR Manifests from \fBinetd.conf\fR
.sp
.LP
The following command generates \fBsmf\fR(7) manifests from \fBinetd.conf\fR(5)
and places them in \fB/var/tmp\fR, overwriting any preexisting manifests of the
same name, and then imports them into the \fBsmf\fR repository.

.sp
.in +2
.nf
# inetconv -f -o /var/tmp
100232/10 -> /var/tmp/100232_10-rpc_udp.xml
Importing 100232_10-rpc_udp.xml ...Done
telnet -> /var/tmp/telnet-tcp6.xml
Importing telnet-tcp6.xml ...Done
.fi
.in -2

.LP
\fBExample 2 \fRGenerating Manifests from an Alternate Input File
.sp
.LP
The following command specifies a different input file and does not load the
resulting manifests into the \fBsmf\fR repository.

.sp
.in +2
.nf
# inetconv -n -i /export/test/inet.svcs -o /var/tmp
100232/10 -> /var/tmp/100232_10-rpc_udp.xml
telnet -> /var/tmp/telnet-tcp6.xml
.fi
.in -2

.SH EXIT STATUS
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 5n
Operation completed successfully (no errors).
.RE

.sp
.ne 2
.na
\fB\fB1\fR\fR
.ad
.RS 5n
Invalid options specified.
.RE

.sp
.ne 2
.na
\fB\fB2\fR\fR
.ad
.RS 5n
One or more service lines are malformed, and thus no manifest(s) were generated
for them.
.RE

.sp
.ne 2
.na
\fB\fB3\fR\fR
.ad
.RS 5n
An error occurred importing one or more of the generated manifests.
.RE

.sp
.ne 2
.na
\fB\fB4\fR\fR
.ad
.RS 5n
A system error occurred.
.RE

.SH FILES
.sp
.ne 2
.na
\fB\fB/var/svc/manifest/network/{rpc}/\fI<svcname>\fR-\fI<proto>\fR\&.xml\fR\fR
.ad
.sp .6
.RS 4n
default output manifest file name
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Evolving
.TE

.SH SEE ALSO
.sp
.LP
.BR inetd.conf (5),
.BR attributes (7),
.BR smf (7),
.BR inetadm (8),
.BR inetd (8),
.BR svccfg (8)