Rename the pwd_mkdb(8) option '-c' to '-C' for better compatiblity

with BSD/OS.
This commit is contained in:
Wolfram Schneider 1998-01-10 17:27:28 +00:00
parent 1e73fe2ae8
commit d7f712093f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=32397
3 changed files with 11 additions and 11 deletions

View File

@ -24,7 +24,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $Id: adduser.perl,v 1.37 1997/09/20 19:59:54 wosch Exp $
# $Id: adduser.perl,v 1.38 1997/12/24 11:44:14 wosch Exp $
# read variables
@ -220,7 +220,7 @@ sub home_partition_valid {
# check for valid passwddb
sub passwd_check {
system("$pwd_mkdb -c $etc_passwd");
system("$pwd_mkdb -C $etc_passwd");
die "\nInvalid $etc_passwd - cannot add any users!\n" if $?;
}

View File

@ -39,7 +39,7 @@
.Nd "generate the password databases"
.Sh SYNOPSIS
.Nm pwd_mkdb
.Op Fl c
.Op Fl C
.Op Fl p
.Op Fl d Ar directory
.Op Fl u Ar username
@ -63,7 +63,7 @@ different from the historic Version 7 style format.
.Pp
The options are as follows:
.Bl -tag -width flag
.It Fl c
.It Fl C
Check if the password file is in the correct format. Do not
change, add, or remove any files.
.It Fl p

View File

@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)pwd_mkdb.c 8.5 (Berkeley) 4/20/94";
#endif
static const char rcsid[] =
"$Id$";
"$Id: pwd_mkdb.c,v 1.20 1997/10/10 06:27:07 charnier Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -108,16 +108,16 @@ main(argc, argv)
char sbuf2[MAXPATHLEN];
char *username;
u_int method, methoduid;
int cflag;
int Cflag;
cflag = 0;
Cflag = 0;
strcpy(prefix, _PATH_PWD);
makeold = 0;
username = NULL;
while ((ch = getopt(argc, argv, "cd:pu:v")) != -1)
while ((ch = getopt(argc, argv, "Cd:pu:v")) != -1)
switch(ch) {
case 'c': /* verify only */
cflag = 1;
case 'C': /* verify only */
Cflag = 1;
break;
case 'd':
strncpy(prefix, optarg, sizeof prefix - 1);
@ -160,7 +160,7 @@ main(argc, argv)
error(pname);
/* check only if password database is valid */
if (cflag) {
if (Cflag) {
for (cnt = 1; scan(fp, &pwd); ++cnt);
exit(0);
}