From 6a3e01d5a9f979f7d6e52665c2bf6c74e2592980 Mon Sep 17 00:00:00 2001 From: Pere Orga Date: Fri, 1 Apr 2011 22:56:30 +0200 Subject: move help text from include/usage.src.h to debianutils/*.c e2fsprogs/*.c editors/*.c loginutils/*.c mailutils/*.c Signed-off-by: Pere Orga Signed-off-by: Denys Vlasenko --- loginutils/addgroup.c | 9 +++++++++ loginutils/adduser.c | 15 +++++++++++++++ loginutils/chpasswd.c | 14 ++++++++++++++ loginutils/cryptpw.c | 39 +++++++++++++++++++++++++++++++++++++++ loginutils/deluser.c | 12 ++++++++++++ loginutils/login.c | 10 ++++++++++ loginutils/passwd.c | 12 ++++++++++++ loginutils/sulogin.c | 7 +++++++ loginutils/vlock.c | 7 +++++++ 9 files changed, 125 insertions(+) (limited to 'loginutils') diff --git a/loginutils/addgroup.c b/loginutils/addgroup.c index 5a0714501..2d6736f1a 100644 --- a/loginutils/addgroup.c +++ b/loginutils/addgroup.c @@ -9,6 +9,15 @@ * Licensed under GPLv2 or later, see file LICENSE in this source tree. * */ + +//usage:#define addgroup_trivial_usage +//usage: "[-g GID] " IF_FEATURE_ADDUSER_TO_GROUP("[USER] ") "GROUP" +//usage:#define addgroup_full_usage "\n\n" +//usage: "Add a group " IF_FEATURE_ADDUSER_TO_GROUP("or add a user to a group") "\n" +//usage: "\nOptions:" +//usage: "\n -g GID Group id" +//usage: "\n -S Create a system group" + #include "libbb.h" #if CONFIG_LAST_SYSTEM_ID < CONFIG_FIRST_SYSTEM_ID diff --git a/loginutils/adduser.c b/loginutils/adduser.c index 0c675caf9..1944d9d56 100644 --- a/loginutils/adduser.c +++ b/loginutils/adduser.c @@ -7,6 +7,21 @@ * * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ + +//usage:#define adduser_trivial_usage +//usage: "[OPTIONS] USER" +//usage:#define adduser_full_usage "\n\n" +//usage: "Add a user\n" +//usage: "\nOptions:" +//usage: "\n -h DIR Home directory" +//usage: "\n -g GECOS GECOS field" +//usage: "\n -s SHELL Login shell" +//usage: "\n -G GRP Add user to existing group" +//usage: "\n -S Create a system user" +//usage: "\n -D Don't assign a password" +//usage: "\n -H Don't create home directory" +//usage: "\n -u UID User id" + #include "libbb.h" #if CONFIG_LAST_SYSTEM_ID < CONFIG_FIRST_SYSTEM_ID diff --git a/loginutils/chpasswd.c b/loginutils/chpasswd.c index 48cf9b130..c2d86664d 100644 --- a/loginutils/chpasswd.c +++ b/loginutils/chpasswd.c @@ -7,6 +7,20 @@ */ #include "libbb.h" +//usage:#define chpasswd_trivial_usage +//usage: IF_LONG_OPTS("[--md5|--encrypted]") IF_NOT_LONG_OPTS("[-m|-e]") +//usage:#define chpasswd_full_usage "\n\n" +//usage: "Read user:password from stdin and update /etc/passwd\n" +//usage: "\nOptions:" +//usage: IF_LONG_OPTS( +//usage: "\n -e,--encrypted Supplied passwords are in encrypted form" +//usage: "\n -m,--md5 Use MD5 encryption instead of DES" +//usage: ) +//usage: IF_NOT_LONG_OPTS( +//usage: "\n -e Supplied passwords are in encrypted form" +//usage: "\n -m Use MD5 encryption instead of DES" +//usage: ) + #if ENABLE_LONG_OPTS static const char chpasswd_longopts[] ALIGN1 = "encrypted\0" No_argument "e" diff --git a/loginutils/cryptpw.c b/loginutils/cryptpw.c index 6c801f9fa..72388c492 100644 --- a/loginutils/cryptpw.c +++ b/loginutils/cryptpw.c @@ -10,6 +10,45 @@ * Licensed under GPLv2, see file LICENSE in this source tree. */ +//usage:#define cryptpw_trivial_usage +//usage: "[OPTIONS] [PASSWORD] [SALT]" +/* We do support -s, we just don't mention it */ +//usage:#define cryptpw_full_usage "\n\n" +//usage: "Crypt the PASSWORD using crypt(3)\n" +//usage: "\nOptions:" +//usage: IF_LONG_OPTS( +//usage: "\n -P,--password-fd=N Read password from fd N" +/* //usage: "\n -s,--stdin Use stdin; like -P0" */ +//usage: "\n -m,--method=TYPE Encryption method TYPE" +//usage: "\n -S,--salt=SALT" +//usage: ) +//usage: IF_NOT_LONG_OPTS( +//usage: "\n -P N Read password from fd N" +/* //usage: "\n -s Use stdin; like -P0" */ +//usage: "\n -m TYPE Encryption method TYPE" +//usage: "\n -S SALT" +//usage: ) + +/* mkpasswd is an alias to cryptpw */ +//usage:#define mkpasswd_trivial_usage +//usage: "[OPTIONS] [PASSWORD] [SALT]" +/* We do support -s, we just don't mention it */ +//usage:#define mkpasswd_full_usage "\n\n" +//usage: "Crypt the PASSWORD using crypt(3)\n" +//usage: "\nOptions:" +//usage: IF_LONG_OPTS( +//usage: "\n -P,--password-fd=N Read password from fd N" +/* //usage: "\n -s,--stdin Use stdin; like -P0" */ +//usage: "\n -m,--method=TYPE Encryption method TYPE" +//usage: "\n -S,--salt=SALT" +//usage: ) +//usage: IF_NOT_LONG_OPTS( +//usage: "\n -P N Read password from fd N" +/* //usage: "\n -s Use stdin; like -P0" */ +//usage: "\n -m TYPE Encryption method TYPE" +//usage: "\n -S SALT" +//usage: ) + #include "libbb.h" /* Debian has 'mkpasswd' utility, manpage says: diff --git a/loginutils/deluser.c b/loginutils/deluser.c index 47a10fe14..e39ac5506 100644 --- a/loginutils/deluser.c +++ b/loginutils/deluser.c @@ -9,6 +9,18 @@ * Licensed under GPLv2, see file LICENSE in this source tree. * */ + +//usage:#define deluser_trivial_usage +//usage: "USER" +//usage:#define deluser_full_usage "\n\n" +//usage: "Delete USER from the system" + +//usage:#define delgroup_trivial_usage +//usage: IF_FEATURE_DEL_USER_FROM_GROUP("[USER] ")"GROUP" +//usage:#define delgroup_full_usage "\n\n" +//usage: "Delete group GROUP from the system" +//usage: IF_FEATURE_DEL_USER_FROM_GROUP(" or user USER from group GROUP") + #include "libbb.h" int deluser_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; diff --git a/loginutils/login.c b/loginutils/login.c index ce0d1741f..f2563dc09 100644 --- a/loginutils/login.c +++ b/loginutils/login.c @@ -2,6 +2,16 @@ /* * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ + +//usage:#define login_trivial_usage +//usage: "[-p] [-h HOST] [[-f] USER]" +//usage:#define login_full_usage "\n\n" +//usage: "Begin a new session on the system\n" +//usage: "\nOptions:" +//usage: "\n -f Don't authenticate (user already authenticated)" +//usage: "\n -h Name of the remote host" +//usage: "\n -p Preserve environment" + #include "libbb.h" #include #include diff --git a/loginutils/passwd.c b/loginutils/passwd.c index f3928cecc..8b6a63eec 100644 --- a/loginutils/passwd.c +++ b/loginutils/passwd.c @@ -2,6 +2,18 @@ /* * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ + +//usage:#define passwd_trivial_usage +//usage: "[OPTIONS] [USER]" +//usage:#define passwd_full_usage "\n\n" +//usage: "Change USER's password. If no USER is specified,\n" +//usage: "changes the password for the current user.\n" +//usage: "\nOptions:" +//usage: "\n -a ALG Algorithm to use for password (des, md5)" /* ", sha1)" */ +//usage: "\n -d Delete password for the account" +//usage: "\n -l Lock (disable) account" +//usage: "\n -u Unlock (re-enable) account" + #include "libbb.h" #include diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c index 0e5b59433..28edf067c 100644 --- a/loginutils/sulogin.c +++ b/loginutils/sulogin.c @@ -5,6 +5,13 @@ * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ +//usage:#define sulogin_trivial_usage +//usage: "[-t N] [TTY]" +//usage:#define sulogin_full_usage "\n\n" +//usage: "Single user login\n" +//usage: "\nOptions:" +//usage: "\n -t N Timeout" + #include "libbb.h" #include diff --git a/loginutils/vlock.c b/loginutils/vlock.c index 3299afa50..efad63ff3 100644 --- a/loginutils/vlock.c +++ b/loginutils/vlock.c @@ -15,6 +15,13 @@ /* Fixed by Erik Andersen to do passwords the tinylogin way... * It now works with md5, sha1, etc passwords. */ +//usage:#define vlock_trivial_usage +//usage: "[-a]" +//usage:#define vlock_full_usage "\n\n" +//usage: "Lock a virtual terminal. A password is required to unlock.\n" +//usage: "\nOptions:" +//usage: "\n -a Lock all VTs" + #include "libbb.h" #ifdef __linux__ -- cgit v1.2.3