diff options
author | Igor Sobrado <sobrado@cvs.openbsd.org> | 2009-10-20 11:01:32 +0000 |
---|---|---|
committer | Igor Sobrado <sobrado@cvs.openbsd.org> | 2009-10-20 11:01:32 +0000 |
commit | acbec9d0f68f9796bc20fb717d1082d687074a2d (patch) | |
tree | 85cf544b9d593e8701c077c2aae25018cc534e15 /usr.sbin/ypserv | |
parent | 93c7b7abadef92fda26401c760b9bdefacece346 (diff) |
the flags -h and -u are mutually exclusive; we do not need enclosing
-f in brackets in the list of options; while here, sort the options
in the manual page.
jmc@ greatly improved the diff fixing a few additional bits on the
manual page.
ok jmc@
Diffstat (limited to 'usr.sbin/ypserv')
-rw-r--r-- | usr.sbin/ypserv/revnetgroup/revnetgroup.8 | 25 | ||||
-rw-r--r-- | usr.sbin/ypserv/revnetgroup/revnetgroup.c | 8 |
2 files changed, 14 insertions, 19 deletions
diff --git a/usr.sbin/ypserv/revnetgroup/revnetgroup.8 b/usr.sbin/ypserv/revnetgroup/revnetgroup.8 index da8bc88acf4..8660455955b 100644 --- a/usr.sbin/ypserv/revnetgroup/revnetgroup.8 +++ b/usr.sbin/ypserv/revnetgroup/revnetgroup.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: revnetgroup.8,v 1.10 2007/05/31 19:20:31 jmc Exp $ +.\" $OpenBSD: revnetgroup.8,v 1.11 2009/10/20 11:01:31 sobrado Exp $ .\" .\" Copyright (c) 1995 .\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -32,7 +32,7 @@ .\" .\" $FreeBSD: revnetgroup.8,v 1.4 1997/02/22 14:22:03 peter Exp $ .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: October 20 2009 $ .Dt REVNETGROUP 8 .Os .Sh NAME @@ -40,8 +40,7 @@ .Nd "generate reverse netgroup data" .Sh SYNOPSIS .Nm revnetgroup -.Fl u -.Fl h +.Fl h | u .Op Fl f Ar netgroup_file .Sh DESCRIPTION .Nm @@ -98,17 +97,7 @@ when rebuilding the YP netgroup maps. .Pp The options are as follows: .Bl -tag -width Ds -.It Fl u -Generate netgroup.byuser output; only username information in the -original netgroup file is processed. -.It Fl h -Generate netgroup.byhost output; only hostname information in the -original netgroup file is processed. (Note at least one of the -.Fl u -or -.Fl h -flags must be specified.) -.It Op Fl f Ar netgroup_file +.It Fl f Ar netgroup_file The .Nm command uses @@ -122,6 +111,12 @@ Specifying as the input file causes .Nm to read from the standard input. +.It Fl h +Generate netgroup.byhost output; only hostname information in the +original netgroup file is processed. +.It Fl u +Generate netgroup.byuser output; only username information in the +original netgroup file is processed. .El .Sh FILES .Bl -tag -width xxxxxxxxxxxxxxxxxxxxxxxx -compact diff --git a/usr.sbin/ypserv/revnetgroup/revnetgroup.c b/usr.sbin/ypserv/revnetgroup/revnetgroup.c index ced15b0d66a..d6a938e7c8c 100644 --- a/usr.sbin/ypserv/revnetgroup/revnetgroup.c +++ b/usr.sbin/ypserv/revnetgroup/revnetgroup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: revnetgroup.c,v 1.7 2006/11/22 07:36:01 ray Exp $ */ +/* $OpenBSD: revnetgroup.c,v 1.8 2009/10/20 11:01:31 sobrado Exp $ */ /* * Copyright (c) 1995 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -48,7 +48,7 @@ #include "hash.h" #ifndef lint -static const char rcsid[] = "$OpenBSD: revnetgroup.c,v 1.7 2006/11/22 07:36:01 ray Exp $"; +static const char rcsid[] = "$OpenBSD: revnetgroup.c,v 1.8 2009/10/20 11:01:31 sobrado Exp $"; #endif /* Default location of netgroup file. */ @@ -66,7 +66,7 @@ struct member_entry *mtable[TABLESIZE]; static void usage(void) { - fprintf (stderr,"usage: revnetgroup -u|-h [-f netgroup file]\n"); + fprintf (stderr,"usage: revnetgroup -h | -u [-f netgroup_file]\n"); exit(1); } @@ -90,7 +90,7 @@ main(int argc, char *argv[]) switch (ch) { case 'u': if (hosts != -1) { - warnx("please use only one of -u or -h"); + warnx("please use only one of -h or -u"); usage(); } hosts = 0; |