diff options
author | Pere Orga | 2011-04-01 22:56:30 +0200 |
---|---|---|
committer | Denys Vlasenko | 2011-04-03 01:33:55 +0200 |
commit | 6a3e01d5a9f979f7d6e52665c2bf6c74e2592980 (patch) | |
tree | b7d40d6e0c6042f0d102101ff7b5784d2f0536ba /loginutils | |
parent | fa9126e68904b16aee2a0fc47688ffe17403152a (diff) | |
download | busybox-6a3e01d5a9f979f7d6e52665c2bf6c74e2592980.zip busybox-6a3e01d5a9f979f7d6e52665c2bf6c74e2592980.tar.gz |
move help text from include/usage.src.h to debianutils/*.c e2fsprogs/*.c editors/*.c loginutils/*.c mailutils/*.c
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'loginutils')
-rw-r--r-- | loginutils/addgroup.c | 9 | ||||
-rw-r--r-- | loginutils/adduser.c | 15 | ||||
-rw-r--r-- | loginutils/chpasswd.c | 14 | ||||
-rw-r--r-- | loginutils/cryptpw.c | 39 | ||||
-rw-r--r-- | loginutils/deluser.c | 12 | ||||
-rw-r--r-- | loginutils/login.c | 10 | ||||
-rw-r--r-- | loginutils/passwd.c | 12 | ||||
-rw-r--r-- | loginutils/sulogin.c | 7 | ||||
-rw-r--r-- | loginutils/vlock.c | 7 |
9 files changed, 125 insertions, 0 deletions
diff --git a/loginutils/addgroup.c b/loginutils/addgroup.c index 5a07145..2d6736f 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 0c675ca..1944d9d 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 48cf9b1..c2d8666 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 6c801f9..72388c4 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 47a10fe..e39ac55 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 ce0d174..f2563dc 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 <syslog.h> #include <sys/resource.h> diff --git a/loginutils/passwd.c b/loginutils/passwd.c index f3928ce..8b6a63e 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 <syslog.h> diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c index 0e5b594..28edf06 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 <syslog.h> diff --git a/loginutils/vlock.c b/loginutils/vlock.c index 3299afa..efad63f 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__ |