[Pkg-shadow-commits] r2361 - in upstream/trunk: . src

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Sat Sep 6 22:20:20 UTC 2008


Author: nekral-guest
Date: 2008-09-06 22:20:19 +0000 (Sat, 06 Sep 2008)
New Revision: 2361

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/src/gpasswd.c
Log:
	* src/gpasswd.c: Document the long options in the usage.


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2008-09-06 21:53:12 UTC (rev 2360)
+++ upstream/trunk/ChangeLog	2008-09-06 22:20:19 UTC (rev 2361)
@@ -1,3 +1,7 @@
+2008-09-07  Nicolas François  <nicolas.francois at centraliens.net>
+
+	* src/gpasswd.c: Document the long options in the usage.
+
 2008-09-06  Nicolas François  <nicolas.francois at centraliens.net>
 
 	* NEWS: Added configure --enable-account-tools-setuid (default) /

Modified: upstream/trunk/src/gpasswd.c
===================================================================
--- upstream/trunk/src/gpasswd.c	2008-09-06 21:53:12 UTC (rev 2360)
+++ upstream/trunk/src/gpasswd.c	2008-09-06 22:20:19 UTC (rev 2361)
@@ -119,15 +119,27 @@
  */
 static void usage (void)
 {
-	fprintf (stderr, _("Usage: %s [-r|-R] group\n"), Prog);
-	fprintf (stderr, _("       %s [-a user] group\n"), Prog);
-	fprintf (stderr, _("       %s [-d user] group\n"), Prog);
+	fprintf (stderr,
+	         _("Usage: %s [option] GROUP\n"
+	           "\n"
+	           "Options:\n"
+	           "  -a, --add USER                add USER to GROUP\n"
+	           "  -d, --delete USER             remove USER from GROUP\n"
+	           "  -r, --remove-password         remove the GROUP's password\n"
+	           "  -R, --restrict                restrict access to GROUP to its members\n"
+	           "  -M, --members USER,...        set the list of members of GROUP\n"
+	           "%s\n"
+	           "\n"),
+	         Prog,
 #ifdef SHADOWGRP
-	fprintf (stderr,
-		 _("       %s [-A user,...] [-M user,...] group\n"), Prog);
+	         _("  -A, --administrators ADMIN,...\n"
+	           "                                set the list of administrators for GROUP\n"
+	           "Except for the -A and -M options, the options cannot be combined.\n")
+	         
 #else
-	fprintf (stderr, _("       %s [-M user,...] group\n"), Prog);
+	         _("The options cannot be combined.\n")
 #endif
+	        );
 	exit (E_USAGE);
 }
 




More information about the Pkg-shadow-commits mailing list