From c1ff1b0c01e9985e977032369d93c228525df201 Mon Sep 17 00:00:00 2001 From: charnier Date: Mon, 24 Nov 1997 07:33:42 +0000 Subject: Add usage(), rcsids. --- libexec/rbootd/bpf.c | 5 ++++- libexec/rbootd/conf.c | 5 ++++- libexec/rbootd/parseconf.c | 5 ++++- libexec/rbootd/rbootd.8 | 14 +++++++------- libexec/rbootd/rbootd.c | 20 ++++++++++++++++---- libexec/rbootd/rmpproto.c | 5 ++++- libexec/rbootd/utils.c | 5 ++++- 7 files changed, 43 insertions(+), 16 deletions(-) (limited to 'libexec/rbootd') diff --git a/libexec/rbootd/bpf.c b/libexec/rbootd/bpf.c index ddeea4f..758e421 100644 --- a/libexec/rbootd/bpf.c +++ b/libexec/rbootd/bpf.c @@ -39,14 +39,17 @@ * SUCH DAMAGE. * * from: @(#)bpf.c 8.1 (Berkeley) 6/4/93 - * $Id: bpf.c,v 1.7 1997/06/29 19:00:01 steve Exp $ * * From: Utah Hdr: bpf.c 3.1 92/07/06 * Author: Jeff Forys, University of Utah CSS */ #ifndef lint +#if 0 static const char sccsid[] = "@(#)bpf.c 8.1 (Berkeley) 6/4/93"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include diff --git a/libexec/rbootd/conf.c b/libexec/rbootd/conf.c index 58da9f0..157f52b 100644 --- a/libexec/rbootd/conf.c +++ b/libexec/rbootd/conf.c @@ -39,14 +39,17 @@ * SUCH DAMAGE. * * from: @(#)conf.c 8.1 (Berkeley) 6/4/93 - * $Id$ * * From: Utah Hdr: conf.c 3.1 92/07/06 * Author: Jeff Forys, University of Utah CSS */ #ifndef lint +#if 0 static const char sccsid[] = "@(#)conf.c 8.1 (Berkeley) 6/4/93"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include diff --git a/libexec/rbootd/parseconf.c b/libexec/rbootd/parseconf.c index 4950e4f..1260c29 100644 --- a/libexec/rbootd/parseconf.c +++ b/libexec/rbootd/parseconf.c @@ -39,14 +39,17 @@ * SUCH DAMAGE. * * from: @(#)parseconf.c 8.1 (Berkeley) 6/4/93 - * $Id: parseconf.c,v 1.6 1997/06/29 19:00:08 steve Exp $ * * From: Utah Hdr: parseconf.c 3.1 92/07/06 * Author: Jeff Forys, University of Utah CSS */ #ifndef lint +#if 0 static const char sccsid[] = "@(#)parseconf.c 8.1 (Berkeley) 6/4/93"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include diff --git a/libexec/rbootd/rbootd.8 b/libexec/rbootd/rbootd.8 index 23c37c5..df5adcc 100644 --- a/libexec/rbootd/rbootd.8 +++ b/libexec/rbootd/rbootd.8 @@ -38,7 +38,7 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)rbootd.8 8.2 (Berkeley) 12/11/93 -.\" $Id: rbootd.8,v 1.6 1997/06/23 04:02:13 steve Exp $ +.\" $Id: rbootd.8,v 1.7 1997/06/29 19:00:13 steve Exp $ .\" .\" Utah Hdr: rbootd.man 3.1 92/07/06 .\" Author: Jeff Forys, University of Utah CSS @@ -56,30 +56,30 @@ .Op config_file .Sh DESCRIPTION The -.Nm rbootd +.Nm utility services boot requests from Hewlett-Packard workstations over a local area network. All boot files must reside in the boot file directory; further, if a client supplies path information in its boot request, it will be silently stripped away before processing. By default, -.Nm rbootd +.Nm only responds to requests from machines listed in its configuration file. .Pp The options are as follows: -.Bl -tag -width Fl +.Bl -tag -width indent .It Fl a Respond to boot requests from any machine. The configuration file is ignored if this option is specified. .It Fl d Run -.Nm rbootd +.Nm in debug mode. Packets sent and received are displayed to the terminal. .It Fl i Ar interface Service boot requests on specified interface. If unspecified, -.Nm rbootd +.Nm searches the system interface list for the lowest numbered, configured ``up'' interface (excluding loopback). Ties are broken by choosing the earliest match. @@ -88,7 +88,7 @@ Ties are broken by choosing the earliest match. Specifying .Ar config_file on the command line causes -.Nm rbootd +.Nm to use a different configuration file from the default. .Pp The configuration file is a text file where each line describes a particular diff --git a/libexec/rbootd/rbootd.c b/libexec/rbootd/rbootd.c index 0129c6d..a74734c 100644 --- a/libexec/rbootd/rbootd.c +++ b/libexec/rbootd/rbootd.c @@ -39,7 +39,6 @@ * SUCH DAMAGE. * * from: @(#)rbootd.c 8.1 (Berkeley) 6/4/93 - * $Id: rbootd.c,v 1.7 1997/06/29 19:00:15 steve Exp $ * * From: Utah Hdr: rbootd.c 3.1 92/07/06 * Author: Jeff Forys, University of Utah CSS @@ -52,7 +51,11 @@ static const char copyright[] = #endif /* not lint */ #ifndef lint +#if 0 static const char sccsid[] = "@(#)rbootd.c 8.1 (Berkeley) 6/4/93"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include @@ -69,7 +72,7 @@ static const char sccsid[] = "@(#)rbootd.c 8.1 (Berkeley) 6/4/93"; #include #include "defs.h" -extern char *__progname; /* from crt0.o */ +static void usage __P((void)); int main(argc, argv) @@ -107,12 +110,14 @@ main(argc, argv) case 'i': IntfName = optarg; break; + default: + usage(); } for (; optind < argc; optind++) { if (ConfigFile == NULL) ConfigFile = argv[optind]; else { - warnx("too many config files (`%s' ignored)\n", + warnx("too many config files (`%s' ignored)", argv[optind]); } } @@ -134,7 +139,7 @@ main(argc, argv) (void) signal(SIGUSR2, DebugOff); } - openlog(__progname, LOG_PID, LOG_DAEMON); + openlog("rbootd", LOG_PID, LOG_DAEMON); /* * If no interface was specified, get one now. @@ -282,6 +287,13 @@ main(argc, argv) } } +static void +usage() +{ + fprintf(stderr, "usage: rbootd [-ad] [-i interface] [config_file]\n"); + exit (1); +} + /* ** DoTimeout -- Free any connections that have timed out. ** diff --git a/libexec/rbootd/rmpproto.c b/libexec/rbootd/rmpproto.c index 31102e8..9a68e3c 100644 --- a/libexec/rbootd/rmpproto.c +++ b/libexec/rbootd/rmpproto.c @@ -39,14 +39,17 @@ * SUCH DAMAGE. * * from: @(#)rmpproto.c 8.1 (Berkeley) 6/4/93 - * $Id: rmpproto.c,v 1.2 1997/06/29 19:00:24 steve Exp $ * * From: Utah Hdr: rmpproto.c 3.1 92/07/06 * Author: Jeff Forys, University of Utah CSS */ #ifndef lint +#if 0 static const char sccsid[] = "@(#)rmpproto.c 8.1 (Berkeley) 6/4/93"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include diff --git a/libexec/rbootd/utils.c b/libexec/rbootd/utils.c index aadb5a9..9dbcf20 100644 --- a/libexec/rbootd/utils.c +++ b/libexec/rbootd/utils.c @@ -39,14 +39,17 @@ * SUCH DAMAGE. * * from: @(#)utils.c 8.1 (Berkeley) 6/4/93 - * $Id: utils.c,v 1.2 1997/06/29 19:00:29 steve Exp $ * * From: Utah Hdr: utils.c 3.1 92/07/06 * Author: Jeff Forys, University of Utah CSS */ #ifndef lint +#if 0 static const char sccsid[] = "@(#)utils.c 8.1 (Berkeley) 6/4/93"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include -- cgit v1.1