agetty: make --remote to forward --nohostname as -H to login
Without this change an attempt to remove hostname printing required following rather clumsy agetty invocation. /sbin/agetty --nohostname --login-options '/bin/login -H -- \u' After the change --nohostname behaves similar way with --host option, that is when combined with --remote the effect is passed to login(1). Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
4783f2005d
commit
343cc27559
|
@ -100,8 +100,12 @@ Don't reset terminal cflags (control modes). See \fBtermios\fP(3) for more
|
||||||
details.
|
details.
|
||||||
.TP
|
.TP
|
||||||
\-E, \-\-remote
|
\-E, \-\-remote
|
||||||
If an \fB\-H\fP \fIfakehost\fP option is given, then an \fB\-r\fP
|
If an \fB\-\-host\fP \fIfakehost\fP option is given, then an \fB\-h\fP
|
||||||
\fIfakehost\fP option is added to the \fB/bin/login\fP command line.
|
\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
|
||||||
|
is added to the \fB/bin/login\fP command line.
|
||||||
.TP
|
.TP
|
||||||
\-f, \-\-issue\-file \fIissue_file\fP
|
\-f, \-\-issue\-file \fIissue_file\fP
|
||||||
Display the contents of \fIissue_file\fP instead of \fI/etc/issue\fP.
|
Display the contents of \fIissue_file\fP instead of \fI/etc/issue\fP.
|
||||||
|
|
|
@ -493,9 +493,12 @@ int main(int argc, char **argv)
|
||||||
login_options_to_argv(login_argv, &login_argc,
|
login_options_to_argv(login_argv, &login_argc,
|
||||||
options.logopt, username);
|
options.logopt, username);
|
||||||
} else {
|
} else {
|
||||||
if (fakehost && (options.flags & F_REMOTE)) {
|
if (options.flags & F_REMOTE) {
|
||||||
login_argv[login_argc++] = "-h";
|
if (fakehost) {
|
||||||
login_argv[login_argc++] = fakehost;
|
login_argv[login_argc++] = "-h";
|
||||||
|
login_argv[login_argc++] = fakehost;
|
||||||
|
} else if (options.flags & F_NOHOSTNAME)
|
||||||
|
login_argv[login_argc++] = "-H";
|
||||||
}
|
}
|
||||||
if (username) {
|
if (username) {
|
||||||
if (options.autolog)
|
if (options.autolog)
|
||||||
|
|
Loading…
Reference in New Issue