On 04/03/2017 05:20 PM, Sami Kerola wrote: > On 3 April 2017 at 09:40, Sami Kerola <kerolasa@xxxxxx> wrote: >> On 3 April 2017 at 02:13, J William Piggott <elseifthen@xxxxxxx> wrote: >>> >>> Hey Sami, since you're here you might want to fix this too? >> >> Hi JWP, >> >> Let me split the change in two: >> >> 1. --nohostname option forward + minimal manual change >> 2. manual page update >> >> Karel, please hold on with these three changes. I will push changes to >> a some branch in my git and tell when the stuff is fast forwardable. > > Here are the updated changes, first one is the minimal option forwarding > and second tries to make manual page better. > > https://github.com/kerolasa/lelux-utiliteetit/commit/343cc275591327bc2094f88387f09702a542dc8c > https://github.com/kerolasa/lelux-utiliteetit/commit/c9151874b67a652b7095243fde2203ab8cd7d107 > > Branch name is: 2017wk13 > Sami, Rather than trying to comment on all of your changes, I'm submitting my suggestions via the attached patch. It applies over your 2017wk13 branch. I changed --login-options according to Karel's comments. Please check that I understood him correctly. Instead of trying to illustrate it's use in the replaceable argument, I moved it to an example. I added some language explaining the purpose of --remote. Please check that I understood that correctly also.
diff --git a/term-utils/agetty.8 b/term-utils/agetty.8 index 5477035..23adff3 100644 --- a/term-utils/agetty.8 +++ b/term-utils/agetty.8 @@ -89,22 +89,29 @@ or 'hurd' for GNU Hurd on a virtual terminal. Assume that the tty is 8-bit clean, hence disable parity detection. .TP \-a, \-\-autologin \fIusername\fP -Automatically log in the specified user without asking username or password. -Use of this option causes \fB\-f \fIusername\fR option and argument to be -added to the \fB/bin/login\fP command line. This option can combined with -\fB\-\-login\-options\fR, and then \\u is replaced by the \fIusername\fR. +Automatically log in the specified user without asking for a username or password. +Using this option causes an \fB\-f \fIusername\fR option and argument to be +added to the \fB/bin/login\fP command line. See \fB\-\-login\-options\fR, which +can be used to modify this option's behavior. .TP \-c, \-\-noreset Do not reset terminal cflags (control modes). See \fBtermios\fP(3) for more details. .TP \-E, \-\-remote +Typically the \fBlogin\fP(1) command is given a remote hostname when +called by something such as \fBtelnetd\fP(8). This option allows \fBagetty\fP +to pass what it is using for a hostname to \fBlogin\fP(1) for use +in \fButmp\fP(5). See \fB\-\-host\fP, \fBlogin\fP(1), and \fButmp\fP(5). +.IP If the \fB\-\-host\fP \fIfakehost\fP option is given, then an \fB\-h\fP \fIfakehost\fP option and argument are added to the \fB/bin/login\fP command line. .IP -If an \fB\-\-nohostname\fR option is given, then an \fB\-H\fP option +If the \fB\-\-nohostname\fR option is given, then an \fB\-H\fP option is added to the \fB/bin/login\fP command line. +.IP +See \fB\-\-login\-options\fR. .TP \-f, \-\-issue\-file \fIissue_file\fP Display the contents of \fIissue_file\fP instead of \fI/etc/issue\fP. @@ -116,8 +123,8 @@ Enable hardware (RTS/CTS) flow control. It is left up to the application to disable software (XON/XOFF) flow protocol where appropriate. .TP -\-H, \-\-host \fIlogin_host\fP -Write the specified \fIlogin_host\fP into the utmp file. Normally, +\-H, \-\-host \fIfakehost\fP +Write the specified \fIfakehost\fP into the utmp file. Normally, no login host is given, since \fBagetty\fP is used for local hardwired connections and consoles. However, this option can be useful for identifying terminal concentrators and the like. @@ -137,12 +144,13 @@ octal 012), write \\012. .TP \-J, \-\-noclear Do not clear the screen before prompting for the login name. -By default screen is cleared. +By default the screen is cleared. .TP \-l, \-\-login\-program \fIlogin_program\fP Invoke the specified \fIlogin_program\fP instead of /bin/login. This allows -the use of a non-standard login program. Such program could for example -ask for a dial-up password or use a different password file. +the use of a non-standard login program. Such a program could, for example, +ask for a dial-up password or use a different password file. See +\fB\-\-login\-options\fP. .TP \-L, \-\-local\-line[=\fImode\fP] Control the CLOCAL line flag. The optional \fImode\fP argument is 'auto', 'always' or 'never'. @@ -192,13 +200,17 @@ program that \fBagetty\fR starts (usually /bin/login) is run as root. \-N, \-\-nonewline Do not print a newline before writing out /etc/issue. .TP -\-o, \-\-login\-options "\fI/path/command --option argument -- \\u\fP" -Options that are passed to the login program. \\u is replaced -by the login name. The default is "/bin/login -- \\u". -.IP -Also see the \fB\-\-autologin\fR and \fB\-\-remote\fR options. -.IP +\-o, \-\-login\-options "\fIlogin_options\fP" +Options and arguments that are passed to \fBlogin\fP(1). Where \\u is +replaced by the login name. For example: +.RS +.IP "" 4 +.B "\-\-login\-options '-h darkstar -- \\\u'" +.PP +See \fB\-\-autologin\fR, \fB\-\-login\-program\fR and \fB\-\-remote\fR. +.PP Please read the SECURITY NOTICE below before using this option. +.RE .TP \-p, \-\-login\-pause Wait for any key before dropping to the login prompt. Can be combined @@ -226,8 +238,8 @@ Note that this has no support for any Unicode characters. .TP \-w, \-\-wait\-cr Wait for the user or the modem to send a carriage-return or a -linefeed character before sending the \fI/etc/issue\fP (or other) file -and the login prompt. This is useful with the \-\-init\-string +linefeed character before sending the \fI/etc/issue\fP file (or others) +and the login prompt. This is useful with the \fB\-\-init\-string\fP option. .TP \-\-nohints @@ -283,7 +295,7 @@ for the other fields. See \fIinittab(5)\fP for more details. For a hardwired line or a console tty: .RS -/sbin/agetty 9600 ttyS1 +.B /sbin/agetty\ 9600\ ttyS1 .RE For a directly connected terminal without proper carrier-detect wiring @@ -291,13 +303,13 @@ For a directly connected terminal without proper carrier-detect wiring prompt): .RS -/sbin/agetty \-\-local\-line 9600 ttyS1 vt100 +.B /sbin/agetty\ \-\-local\-line\ 9600\ ttyS1\ vt100 .RE For an old-style dial-in line with a 9600/2400/1200 baud modem: .RS -/sbin/agetty \-\-extract\-baud \-\-timeout 60 ttyS1 9600,2400,1200 +.B /sbin/agetty\ \-\-extract\-baud\ \-\-timeout\ 60\ ttyS1\ 9600,2400,1200 .RE For a Hayes modem with a fixed 115200 bps interface to the machine @@ -306,7 +318,7 @@ modem/computer DCD track modem/modem DCD, makes a DTR drop cause a disconnection, and turns on auto-answer after 1 ring): .RS -/sbin/agetty \-\-wait\-cr \-\-init\-string 'ATE0Q1&D2&C1S0=1\\015' 115200 ttyS1 +.B /sbin/agetty\ \-\-wait\-cr\ \-\-init\-string\ 'ATE0Q1&D2&C1S0=1\\015'\ 115200\ ttyS1 .RE .SH SECURITY NOTICE @@ -394,7 +406,7 @@ Insert the string "1 user" or "<n> users" where <n> is the number of current users logged in. .TP v -Insert the version of the OS, that is the build-date and such. +Insert the version of the OS, that is, the build-date and such. .PP An example. On my system, the following \fI/etc/issue\fP file: .sp