Commit Graph

63 Commits

Author SHA1 Message Date
Sami Kerola 74b3df85f7 agetty: replace gethostbyname() with getaddrinfo()
The gethostbyname() is legacy function which may be withdrawn in a
future.

Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/gethostbyname.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-10-22 10:14:36 +02:00
Karel Zak 2b945eda3d agetty: add \4 and \6 issue file sequences to print IP addresses
Based on Andrea Bonomi <a.bonomi@endian.com> ideas.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-13 12:59:46 +02:00
Karel Zak 01095ae33c agetty: pass hostname to login(1)
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-10-26 23:17:15 +02:00
Karel Zak 36601b2343 agetty: add --nohints
Reported-by: "Gabor Z. Papp" <gzp@papp.hu>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-12 14:24:27 +02:00
Benno Schulenberg 232dc924c4 docs: uniformize the header and footer lines in man pages
Use dates without the day, use the full month name, put "util-linux" in
the lower left corner, and "User Commands" or "System Administration"
at the top center.

Also improve here and there the one-line program description.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2011-08-22 10:39:21 +02:00
Karel Zak 9aeb66dc6b agetty: improve login(1) argv[]
* fix regression: missing username should not be reported (EPERM) if
  -n/--skip-login is given and username is NULL.

* don't compose login options *string* if we can use argv *array* (the
  string is necessary only for --login-options).

* don't overwrite --login-options by --autologin

  The old code silently ignores login-options and "login -f <username>"
  is always used.

  The new code uses:
    a)	"login -f <username>"    by default
    b)	"login <login-options>"  for --login-options + --autologin

  where for b) the username from "--autologin <username>" is used to
  replace \u magic string in <login-options>.

* the \u could be used more than once in one login argv string, for
  example: agetty --login-options "-o user=\\u,name=\\u --foo"

* the space in --login-options is correctly ignored, for example
  agetty --login-options " hello world ".

Reviewed-by: Voelker, Bernhard <bernhard.voelker@siemens-enterprise.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-08-08 12:07:07 +02:00
Karel Zak 3fc62fd3a5 agetty: remove unnecessary options synonyms
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-05-17 13:21:45 +02:00
Dr. Werner Fink e85281a8ac aggety: further mingetty features
Allow the system adminstrator to provide options to the login
program.   Some changes for several layouts of the agetty
prompt like short host name or full qualified host name.
Four options enables the user to delay agetty after start,
to change the working directory, to change the root directory,
and to modified scheduling priority.

Signed-off-by: Werner Fink <werner@suse.de>
2011-05-17 11:13:19 +02:00
Werner Fink eb8e1f9f0c agetty: add an autologin feature
Add an autologin feature to agetty, that is that a user can be
automatically logged in.  For this the options of for the
login program has to used.  Make it possible to pass-through
options to the login program which requires a security check.

Signed-off-by: Werner Fink <werner@suse.de>
2011-05-17 11:13:06 +02:00
Werner Fink 3aa6b68f7e agetty: proper session on the terminal line
Ensure a proper session on the terminal line, that is do a
vhangup() and become the controlling terminal.  After this
determine if the terminal line a virtual console by using
the ioctl TIOCMGET to get the status modem bits of a serial
line which is a invalid argument on a virtual console.

Signed-off-by: Werner Fink <werner@suse.de>
2011-05-17 11:10:21 +02:00
Sami Kerola d54749cf33 docs: agetty manual update
Tell users how to see what issue escape will print by using other
commands, such as uname.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-04-27 23:21:21 +02:00
Sami Kerola e9980cf8f1 docs: agetty long options
Long options to manual page with the new --version and --help.
The manual page option order is also set to be the same as it is
in code. For the persons who don't see the order it is short
option case in sensitive alphabetical order.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-04-14 13:20:25 +02:00
Karel Zak cf56b8b507 build-sys: move agetty to term-utils
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-03-02 13:57:00 +01:00