Commit Graph

6301 Commits

Author SHA1 Message Date
Karel Zak 2885c533fd logger: make socket initialization in main() more readable
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-08 16:39:59 +02:00
Sami Kerola 68265d070d logger: allow to log using tcp transport protocol
This commit fixes error in usage() text, which claimed TCP is default
transport protocol.  That was not true, and neither it should be.  The
syslog messages has traditionally sent using UDP.

For the logger remains using UDP as first transport, but if it fails a
TCP connection is attempted.  If an user wishes remote logging can be
forced to use either UDP or TCP.  The service port for UDP is familiar
'syslog', for TCP the port 'syslog-conn' seems like reasonable default.

[kzak@redhat.com: - rename myopenlog to unix_socket(),
                  - always reset st to -1]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-08 16:31:28 +02:00
Karel Zak e442ab76b5 fsfreeze: add note about atime to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-08 13:32:16 +02:00
Karel Zak ece777e9de build-sys: add --disable-bash-completion
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 15:54:31 +02:00
Karel Zak 20da58084a bash-completion: rename shell-completion -> bash-completion
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 14:58:07 +02:00
Karel Zak aead7c7e69 Merge branch 'shell-completion' of git://github.com/kerolasa/lelux-utiliteetit
* 'shell-completion' of git://github.com/kerolasa/lelux-utiliteetit:
  bash-completion: add completion files to Makefile.am
  bash-completion: text-utils
  bash-completion: term-utils
  bash-completion: sys-utils
  bash-completion: schedutils
  bash-completion: misc-utils
  bash-completion: login-utils
  bash-completion: fdisks
  bash-completion: disk-utils
  bash-completion: add bash completetion configure option
2013-04-05 14:14:28 +02:00
Sami Kerola fe6999da0a logger: make local sockets to try both stream and datagram
When journald, from systemd, is in use logger gave following error.

$ logger --socket /dev/log test logger: connect /dev/log: Protocol wrong
type for socket

The journald supports only AF_DGRAM, and nothing else.  Support for
AF_STREAM sockets was dropped because it messed up message ordering.

From an users point of view necessity to add --udp (UNIX(TM) Datagram
Protocol?) option when talking to syslog via unix socket felt confusing
and wrong.  The command should know what is the socket type, and silently
use the correct one, unless the type is explicitely defined.

CC: Karel Zak <kzak@redhat.com>
Adviced-by: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-05 14:05:24 +02:00
Sami Kerola 5d1607e260 setarch: add option to list settable architectures
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-05 14:03:07 +02:00
Sami Kerola fdf8fb1cc0 chrt: make command syntax easier to understand in usage()
And mention in manual that the default is referring to the internal
default of this command, not the Linux system default.  Manual page
example also tries to be a little more complete how to use the command.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-05 13:56:17 +02:00
Sami Kerola cc8e993401 vipw: add usage() function
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-05 13:56:14 +02:00
Sami Kerola 2dc87166a7 setterm: fix various color option argument lists
The lists did not have correct colors in usage().  Because the usage()
had to be fixed, it is best to make the output easy for translators to
work with.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-05 13:56:12 +02:00
Sami Kerola f059bdf608 partx: remove deprecated option from usage()
The fact that -l, --list is deprecated will remain in manual page till
unforeseeable future.  Meanwhile the usage() can be made shorter.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-05 13:56:09 +02:00
Sami Kerola ac56e5558e lscpu: fix error message
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-05 13:56:06 +02:00
Sami Kerola 114ade3d1b losetup: allow -j option argument to be relative path
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-05 13:56:03 +02:00
Sami Kerola 5543aaad23 fsfreeze: tell user when mandatory option is not specified
This commit also removes use of internal magic values by replacing them
with a enum definition.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-05 13:56:00 +02:00
Sami Kerola 963ac50734 dmesg: fix usage() output consistancy
Possible facilities and levels are meant to be printed to same file as
the rest of the usage output.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-05 13:55:57 +02:00
Sami Kerola 86ad1432e8 agetty: the command does not have -h and -V options
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-05 13:55:54 +02:00
Sami Kerola 5fb01f4331 newgrp: use xstrdup to check allocation succeeded
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-05 13:55:50 +02:00
Karel Zak 8d8ea18ea7 docs: remove repeated words
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 13:35:30 +02:00
Karel Zak 49ebda9b89 rtcwake: add --auto to usage()
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 13:19:13 +02:00
Karel Zak d58adea4bd readprofile: reorder options in man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 13:16:02 +02:00
Karel Zak 0ca4988c37 readprofile: add --counters to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 13:13:10 +02:00
Karel Zak 1b8ce047a0 fsck: cleanup usage()
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 13:07:59 +02:00
Karel Zak 4b856ee4b9 agetty: add --chroot to usage() and man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 12:55:20 +02:00
Karel Zak 1505a0b266 agetty: add -E, --remote to usage()
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 12:47:42 +02:00
Karel Zak a2343e0312 ul: cleanup usage() and man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 12:43:51 +02:00
Karel Zak 4fa491b3f4 raw: add long options to man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 12:36:29 +02:00
Karel Zak 6d402bbedc mount: add --read-write to man page 2013-04-05 12:32:34 +02:00
Karel Zak 81009d7255 mount: add --show-labels to man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 12:19:40 +02:00
Karel Zak edd82b9c99 setarch: normalize man page formatting
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 11:49:37 +02:00
Karel Zak 3706db7c08 getopt: fix usage() typo unquote -> unquoted
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 11:21:17 +02:00
Karel Zak 395eb05d16 findmnt: fix typo fsroot -> nofsroot
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 11:19:56 +02:00
Karel Zak 3b1346a877 blkid: use O_CLOEXEC
... to make "strace -e open blkid" for libblkid stuff without
exceptions.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-03 16:14:47 +02:00
Karel Zak 4000fc128c libblkid: use O_CLOEXEC
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-03 16:14:15 +02:00
Karel Zak 1eb8539d3b libmount: use O_CLOEXEC
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-03 16:14:03 +02:00
Karel Zak a61cac5b64 libuuid: use O_CLOEXEC
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-03 16:13:55 +02:00
Karel Zak 065070f216 libfdisk: use O_CLOEXEC
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-03 16:13:45 +02:00
Karel Zak b1fa3e2234 lib: use O_CLOEXEC in libcommon
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-03 16:13:06 +02:00
Karel Zak 7e3729e750 include/fileutils: use O_CLOEXEC for mktemp stuff
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-03 16:12:34 +02:00
Karel Zak 2ffad204c0 include/c: add macro UL_CLOEXECSTR
... to make "e" for fopen() portable to systems without O_CLOEXEC.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-03 16:11:19 +02:00
Karel Zak 4e5262e450 lib/canonicalize: don't use /dev/mapper/<name> if the node does not exist
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-03 13:32:39 +02:00
Karel Zak 39de73f5f1 libmount: add version and features to debug output
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-02 22:26:12 +02:00
Sami Kerola 20a5105648 bash-completion: add completion files to Makefile.am
And remove shell completion TODO item.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-01 17:41:55 +01:00
Sami Kerola c72fca2ced bash-completion: text-utils
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-01 17:41:55 +01:00
Sami Kerola 8884f6d5f4 bash-completion: term-utils
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-01 17:41:55 +01:00
Sami Kerola c6f8c3f5ce bash-completion: sys-utils
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-01 17:41:55 +01:00
Sami Kerola 18b0017ae6 bash-completion: schedutils
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-01 17:41:55 +01:00
Sami Kerola 76dceb10a1 bash-completion: misc-utils
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-01 17:41:50 +01:00
Sami Kerola 41e5a92cf1 bash-completion: login-utils
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-01 17:16:53 +01:00
Sami Kerola 2bd3b27a25 bash-completion: fdisks
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-01 16:31:12 +01:00