xref: /dragonfly/sbin/rconfig/rconfig.8 (revision 63e03116)
1.\"
2.\" Copyright (c) 2003,2004 The DragonFly Project.  All rights reserved.
3.\"
4.\" This code is derived from software contributed to The DragonFly Project
5.\" by Matthew Dillon <dillon@backplane.com>
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\"
11.\" 1. Redistributions of source code must retain the above copyright
12.\"    notice, this list of conditions and the following disclaimer.
13.\" 2. Redistributions in binary form must reproduce the above copyright
14.\"    notice, this list of conditions and the following disclaimer in
15.\"    the documentation and/or other materials provided with the
16.\"    distribution.
17.\" 3. Neither the name of The DragonFly Project nor the names of its
18.\"    contributors may be used to endorse or promote products derived
19.\"    from this software without specific, prior written permission.
20.\"
21.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
25.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26.\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
27.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
29.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
31.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32.\" SUCH DAMAGE.
33.\"
34.Dd June 16, 2019
35.Dt RCONFIG 8
36.Os
37.Sh NAME
38.Nm rconfig
39.Nd Remote Configuration Client/Server
40.Sh SYNOPSIS
41.Nm
42.Op Fl a
43.Op Fl v
44.Op Fl W Ar workdir
45.Op Ar host[:tag] Ar ...
46.Nm
47.Fl s
48.Op Fl a
49.Op Fl C Ar configfiles
50.Op Fl T Ar tagdir
51.Op Fl v
52.Op Ar bind_address Ar ...
53.Sh DESCRIPTION
54The
55.Nm
56utility provides simple remote configurator functionality.  In client mode
57.Nm
58will broadcast a request for the specified configuration tag over available
59interfaces (or you can specify an IP), locate a server capable of supplying
60the tag, then connect to, download, and run the script associate with the
61tag.  In server mode
62.Nm
63will listen on port 257 for broadcast requests (UDP) and connections (TCP).
64Note that UDP based requests are only responded to if the requested tag
65is available.  You can run the server on multiple machines on the LAN
66serving different tags or, if you wish to provide a backup, serving the
67same tags, or a mix.  The client will use the first matching tag it encounters.
68.Pp
69The following command line options are available when operating in client mode:
70.Bl -tag -width Fl
71.It Fl a
72.Nm
73will broadcast a request for the 'auto' tag on all available interfaces.
74No additional arguments are necessary.
75.It Fl W Ar workdir
76Specify the working directory for script downloads.  The default is
77.Pa /tmp .
78.It Fl v
79Verbose mode prints additional information during program execution.
80.It host[:tag]
81Specify any number of remote IP addresses or broadcast addresses.  If no
82tag is specified
83.Nm
84defaults to 'auto'.  If you specify just a tag using :tag the broadcast
85address for all available interfaces will be used.  The
86.Fl a
87option should not be used in that case.
88.El
89.Pp
90The following command line options are available when operating in server mode:
91.Bl -tag -width Fl
92.It Fl s
93This option is required to operate
94.Nm
95as a server.
96.It Fl a
97.Nm
98will bind to and listen on all available interfaces.  If this option is not
99used you must specify a particular IP address or addresses to bind to.  The
100server listens on port 257 for both UDP and TCP.
101.It Fl T Ar tagdir
102Specify the directory containing the tag scripts.  The default is
103.Pa /usr/local/etc/rconfig .
104Tag scripts are in the form:
105.Pa tagname.sh .
106The tag name can only consist of alphabets (lower and upper letters),
107digits (zero to nine), underscore (_), dot (.),
108minus (-) and plus (+) symbols.
109.It Fl C Ar configfiles
110Specify server configuration files (currently unused).
111.It Fl v
112Verbose mode prints additional information during program execution.
113.It bind_address
114Specify any number of IP addresses or hostnames corresponding to machine
115local addresses that the server will bind to and listen on.
116.El
117.Sh FILES
118.Pa /usr/share/examples/rconfig
119.Sh SEE ALSO
120.Xr dhclient 8
121.Sh AUTHORS
122This program was written by
123.An Matthew Dillon .
124