I had nothing better to do :) Perhaps this could be useful. I tested it and
it seemed to work, but as always, no guarantees. It adds an option
--no-hostname to mingetty
There's a lot more one could do to this program. As for instance do away with
some of the hardcoded values (do non-english speaking people really want
'login'?). If it is of interest I may just do it.
regards
Anders
--- mingetty.c.old Thu Nov 15 23:46:17 2001
+++ mingetty.c Fri Nov 16 00:26:11 2001
@@ -113,7 +113,7 @@
#include
#include
-#define LOGIN " login: " /* login prompt */
+#define LOGIN "login: " /* login prompt */
#ifndef _PATH_LOGIN
#define _PATH_LOGIN "/bin/login"
@@ -137,6 +137,8 @@
static int noclear = 0;
/* Print the whole string of gethostname() instead of just until the next
"." */
static int longhostname = 0;
+/* Do not print the hostname at all */
+static int nohostname = 0;
/* do not reset the terminal ? */
static int noreset = 0;
/* login program */
@@ -612,7 +614,10 @@
close (fd);
}
#endif
- write (1, hn, strlen (hn));
+ if(!nohostname){
+ write (1, hn, strlen (hn));
+ write (1, " ", 1);
+ }
write (1, LOGIN, sizeof (LOGIN) - 1);
}
@@ -656,7 +661,7 @@
static void usage (void)
{
- error ("%s: usage: '%s [--noclear] [--noreset] [--long-hostname]
[--login program] [--logopts \"loginprg opts\"] tty' with e.g. tty=tty1",
VERSION, progname);
+ error ("%s: usage: '%s [--noclear] [--noreset] [--long-hostname]
[--no-hostname] [--login program] [--logopts \"loginprg opts\"] tty' with
e.g. tty=tty1", VERSION, progname);
}
static struct option const long_options[] = {
@@ -665,6 +670,7 @@
{ "noreset", no_argument, &noreset, 1},
{ "login", required_argument, 0, 2},
{ "logopts", required_argument, 0, 3},
+ { "no-hostname", no_argument, &nohostname, 1},
{ 0, 0, 0, 0 }
};
@@ -753,6 +759,8 @@
loginprog = optarg; break;
case 3:
logoptstr = optarg; break;
+ case 4:
+ break;
default:
usage ();
}
On Friday 16 November 2001 00:07, Cleary_Mike@emc.com wrote:
Thanks guys! And test it we will...
I'm passing the info on as we speak. :)
I'll post back what works (may not be until tomorrow..)
Mike
------------------------------------------------------
Cleary_Mike@emc.com
-----------------------------------------------------
A redneck's famous last words... " Hey y'all, watch this!"
-----Original Message-----
From: Christopher Mahmood [mailto:ckm@suse.com]
Sent: Thursday, November 15, 2001 6:03 PM
To: suse-linux-e@suse.com
Subject: Re: [SLE] login prompt
* Anders Johansson (andjoh@cicada.linux-site.net) [011115 14:49]:
Isn't it mingetty that's used to print the message?
I thought that stuff was just for formatting what's in /etc/issue?
Let's wait for the original poster to test it for us :)