Several of the /etc/issue escape codes such as \4 and \6 depend on
the current addresses of the system that can change after the agetty
prompt is displayed. This can cause stale data to be displayed
when a user looks at a VT, especially in cases of DHCP racing with
system start up.
Similar to the --reload mechanism, if we're displaying an address
in the issue output, and the user hasn't typed anything yet: then
redisplay the prompt with the new address.
We use netlink to watch for address changes. We only open the netlink
socket if we display an address in the issue file.
The libc openlog(3) does not have error detection whether unix socket
could be opened. As a side effect that made it possible to use logger
even if syslogd was not running. Of course user message in these cases
were lost. This change makes the logger do behave similar way again, so
that sysvinit scripts can successfully pipe messages to logger when ever.
Addresses: https://bugs.debian.org/787864
Addresses: https://bugs.debian.org/790875
Reported-by: Andreas Beckmann <anbe@debian.org>
Reported-by: Andreas Henriksson <andreas@fatal.se>
Tested-by: Robie Basak <robie.basak@ubuntu.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The Gigaset M101 exhibits particularly awkward and confusing behaviour
when the serial line speed isn't set to what the device expects:
Configuration mode detects the used speed and works anyway, but data
mode silently fails. Troubleshooting this is enormously time-consuming.
Spare the users this trouble by setting the line speed and format to
these devices' factory default values as long as the command line
doesn't say otherwise.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
The hardcoded column width of 10 in print_table() is not enough, as
the currently longest table entry to be printed has 12 characters.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
[kzak@redhat.com: - be careful with errno and DBG
- add EINTR check
(both suggested by Rudi]
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Signed-off-by: Karel Zak <kzak@redhat.com>
==3445== Syscall param ioctl(generic) points to uninitialised byte(s)
==3445== at 0x4F16477: ioctl (in /usr/lib/libc-2.21.so)
==3445== by 0x402785: setup_alarm (rtcwake.c:231)
==3445== by 0x403302: main (rtcwake.c:520)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The rtcwake has various mode names that are internal to the command,
listed in rtcwake_mode_string array, while some modes are dynamicaly
listed in /sys/power/state. Together these form the allowed modes.
[kzak@redhat.com: - cleanup strv usage]
Reviewed-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
Commit ece44f19f4 missed freeze mode, which
to a simple patch adding the missing argument but Karel pointed out it
would be better to make the rtcwake to tell what arguments are supported
so that possible changes end up to be automatically correct in bash
completion.
Proposed-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Make skipping two lines more robust, and add message about unexpected
adjfile contents when running with --verbose.
Reviewed-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The RTC_WKALM_RD and RTC_WKALM_SET have been available since 2.6.17, and
preferred way since 2007. Keeping the fallbacks to the old interface is
no longer needed.
Reference: e824290e5d
Reference: f8245c2688
Reviewed-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Most distributions probably ship reset from ncurses, which means
util-linux reset(1) is unlikely to be in use anywhere. Assuming the
previous being true it is almost unimaginable anyone one would be using
the alternative script, so remove it and mark the script deprecated.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>