su: document -l in --help text. Closes bug 2761
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 31 Dec 2010 01:52:35 +0000 (02:52 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 31 Dec 2010 01:52:35 +0000 (02:52 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
include/usage.src.h
loginutils/su.c

index 69a9fa159e122573a6c87482d0357828eb50c31f..ea0e6a45207c60f73b294f0fa51a69491f1b83f5 100644 (file)
@@ -3524,15 +3524,6 @@ INSERT
      "\n       -g              Print in stty-readable form" \
      "\n       [SETTING]       See manpage" \
 
-#define su_trivial_usage \
-       "[OPTIONS] [-] [USERNAME]"
-#define su_full_usage "\n\n" \
-       "Change user id or become root\n" \
-     "\nOptions:" \
-     "\n       -p,-m   Preserve environment" \
-     "\n       -c CMD  Command to pass to 'sh -c'" \
-     "\n       -s SH   Shell to use instead of default shell" \
-
 #define sulogin_trivial_usage \
        "[-t N] [TTY]"
 #define sulogin_full_usage "\n\n" \
index c31e7e771276bf544aa186932629e8474bade3ad..db303af6dfc79620ac91b7d7e778b29f374a4c39 100644 (file)
@@ -8,6 +8,16 @@
 #include "libbb.h"
 #include <syslog.h>
 
+//usage:#define su_trivial_usage
+//usage:       "[OPTIONS] [-] [USER]"
+//usage:#define su_full_usage "\n\n"
+//usage:       "Run shell under USER (by default, root)\n"
+//usage:     "\nOptions:"
+//usage:     "\n       -,-l    Clear environment, run shell as login shell"
+//usage:     "\n       -p,-m   Do not set new $HOME, $SHELL, $USER, $LOGNAME"
+//usage:     "\n       -c CMD  Command to pass to 'sh -c'"
+//usage:     "\n       -s SH   Shell to use instead of user's default"
+
 #if ENABLE_FEATURE_SU_CHECKS_SHELLS
 /* Return 1 if SHELL is a restricted shell (one not returned by
  * getusershell), else 0, meaning it is a standard shell.  */