summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--term-utils/agetty.88
-rw-r--r--term-utils/agetty.c9
2 files changed, 12 insertions, 5 deletions
diff --git a/term-utils/agetty.8 b/term-utils/agetty.8
index 40be8b46c..4431341c2 100644
--- a/term-utils/agetty.8
+++ b/term-utils/agetty.8
@@ -100,8 +100,12 @@ Don't reset terminal cflags (control modes). See \fBtermios\fP(3) for more
details.
.TP
\-E, \-\-remote
-If an \fB\-H\fP \fIfakehost\fP option is given, then an \fB\-r\fP
-\fIfakehost\fP option is added to the \fB/bin/login\fP command line.
+If an \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
+is added to the \fB/bin/login\fP command line.
.TP
\-f, \-\-issue\-file \fIissue_file\fP
Display the contents of \fIissue_file\fP instead of \fI/etc/issue\fP.
diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index 6a2085a3c..93a3843c7 100644
--- a/term-utils/agetty.c
+++ b/term-utils/agetty.c
@@ -493,9 +493,12 @@ int main(int argc, char **argv)
login_options_to_argv(login_argv, &login_argc,
options.logopt, username);
} else {
- if (fakehost && (options.flags & F_REMOTE)) {
- login_argv[login_argc++] = "-h";
- login_argv[login_argc++] = fakehost;
+ if (options.flags & F_REMOTE) {
+ if (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 (options.autolog)