Users wish to see the message should include also remote messages, not
only the one sent to locally via libc function.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
When scripts send several messages they will be easier to group together
when parent process id is printed rather than id of the each logger
process.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Inform about rfc5424 support, how to control what it includes to
submission, and that it is the new default when sending syslog messages
to remote server without specifying protocol.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Add support the more recent syslog protocol and make it default. The
older BSD syslog protocol can still be used with option --rfc3164.
Protocols are meaningful only when messages are sent to remote syslog
server.
Requested-by: Kodiak Firesmith <ksf@sei.cmu.edu>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Add logger_open(), logger_command_line(), logger_stdin(), and
logger_close() functions, and move all remaining option argument
assignments to control structure.
Proposed-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
When if clause that continues throughout whole function it usually can be
shorten to immediate action, e.g., in this case return on the spot not at
end of the function.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The getlogin(3) is known not to always work, and when that happens it is
reasonable to try determine user of name by looking process owner and
passwd information.
Reference: http://man7.org/linux/man-pages/man3/getlogin.3.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
It is fair assumption messages an user is asking to be wrote will be
attempted to be wrote as hard as possible.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Add an 'agetty --reload' command which asks all running agetty
commands to display their prompts again.
Several of the /etc/issue escape codes such as \4 and \S depend on
variable data which 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.
We never want this to occur once the user has started typing a
user name. So we detect when the user starts typing, after which
no further reprompting occurs after that point.
[kzak@redhat.com: - add #ifdefs to make it usable on non-inotify systems,
- use futimens() with NULL timespec
- add --reaload to usage()]
Signed-off-by: Stef Walter <stefw-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
This fixes the following compiler warning.
disk-utils/swaplabel.c:175:2: warning: implicit declaration of function
'get_swap_prober' [-Wimplicit-function-declaration]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
* don't use err(), but warn(), so don't stop after the first error
* display all errors when "-l <device> ..." specified
* display only EACCES errors when list whole disks from
/proc/partitions ("fdisk -l" )
Reported-by: Boian Bonev <bbonev@ipacct.com>
Addresses: https://github.com/karelzak/util-linux/pull/106
Signed-off-by: Karel Zak <kzak@redhat.com>
The xiafs filesystem was removed from the kernel fifteen years ago,
and any kernel that contained it reached end of life ten years ago.
It's time to stop mentioning it in the mount man page and elsewhere.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Also sort the command-line options alphabetically
(with the customary exception of -V and -h).
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Mainly more option sorting, some formatting adjustments, and the adding
of a missing --version here and there.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
After quitting cfdisk (built with slang) the cursor would be
missing at the command prompt.
Reported-by: Martin Steigerwald <Martin@Lichtvoll.de>
Addresses-Debian-Bug: #755991
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Neither dig or nslookup would be my first option for resolving,
so add the host utility of ISC/bind fame and the (slow) getent
utility shipped with libc.
This extends the conditions introduced in ...
commit a98de9696e
Author: Ruediger Meier <ruediger.meier@ga-group.nl>
Date: Wed Jun 11 19:28:20 2014 +0200
tests: skip some last tests if no dns support
... and should help us not skip certain tests when we have
network connection but none of dig or nslookup available.
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
"gcc (SUSE Linux) 4.8.1 20130909 [gcc-4_8-branch revision 202388]"
issued the following warning:
warning: format ‘%zu’ expects argument of type ‘size_t’, \
but argument 3 has type ‘int’ [-Wformat=]
* misc-utils/mcookie.c (main): Change format from %zu to %d.
RAND_BYTES is an enum, thus of type int.
Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
* remove the huge and unmaintained list of filesystems, just keep
only very basic FS types in the man pages
* add info about command delimited lists to fstab.5
Signed-off-by: Karel Zak <kzak@redhat.com>
# mkfs.ext4 /dev/sda1
# mount -t foo,bar /dev/sda1 /mnt
successfully mount the device, this is unexpected as extN is no
between wanted (by -t specified) filesystems.
Summary about -t:
* "mount -t foo" mount(2) with "foo" type
* "mount -t foo,bar" try mount(2) with "foo" or "bar"
* "mount -t foo,auto" try mount(2) with "foo" or ask libblkid for
the type
* "mount -t nofoo,bar" try types from /{etc,proc}/filesystems, but
exclude "foo" and "bar"
Note that more filesystems may be specified in fstab (as comma
delimited list). The stuff from fstab is always interpreted as list
and never as a pattern ("no" prefix makes no sense in fstab).
Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
The "linux only" check for pivot_root seems to suffer from
a cut-n-paste problem from the earlier switch_root part.
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Fixing plain typos, miswordings, inconsistent periods, some missing
angular brackets, and a proper pluralization (even when it involves
a constant, because for some languages the precise value matters).
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
The swapon(8) listing was almost complete, apart from label and uuid.
This change moves the code from swaplabel(8) to shared scope to be used
for printouts in other swap commands, such as swapon.
Adding this feature to lsblk(8) was a consideration, but lsblk is not
interested of swapfiles, so the swapon seems like a better option to add
this information.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* 'rename' of git://github.com/kerolasa/lelux-utiliteetit:
tests: add rename(1) return value check
rename: use function pointer to select file or symlink operation
rename: continue despite something failed
tests: add rename(1) checks
tests: use ts_cd everywhere to change direcrory
tests: add function to change directory reliable way
rename: allow renaming in subdirectories