Commit Graph

8076 Commits

Author SHA1 Message Date
Ondrej Oprala 969ee9e3ff lslogins: comment-in an expensive realloc
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2014-05-15 13:56:00 +02:00
Ondrej Oprala 4ea7848b50 lslogins: add option --iso
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2014-05-15 13:56:00 +02:00
Ondrej Oprala 384965928a lslogins: add support for multiple time formats
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2014-05-15 13:55:59 +02:00
Ondrej Oprala c77108b867 lslogins: pretty printing and extended -l,-g 2014-05-15 13:55:59 +02:00
Ondrej Oprala bd09da48ad lslogins: also add readutmp.c 2014-05-15 13:55:59 +02:00
Ondrej Oprala f1728a4cbd lslogins: add readtump.h header 2014-05-15 13:55:59 +02:00
Ondrej Oprala c6cf4d1c46 lslogins: make it work
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2014-05-15 13:55:59 +02:00
Ondrej Oprala 1ebfc60a0f lslogins: use thread-safe functions
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2014-05-15 13:55:59 +02:00
Ondrej Oprala dd7760a8c1 lslogins: store users in a tree
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2014-05-15 13:55:59 +02:00
Ondrej Oprala 29cc2a5568 lslogins: add functionality
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2014-05-15 13:55:59 +02:00
Ondrej Oprala 78dd745089 login: extract get_hushlogin_status
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2014-05-15 13:55:59 +02:00
Ondrej Oprala 914e20a00a lslogins: move to login-utils
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2014-05-15 13:55:59 +02:00
Ondrej Oprala ab1cfad5b7 lslogins(1): skeleton and argparsing for a new utility
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2014-05-15 13:55:59 +02:00
Ruediger Meier 8930be5a22 tests: check for mkfs.ext{2,3,4}
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-05-15 12:51:24 +02:00
Ruediger Meier 12826d4c20 tests: consolidate some checks for commands
Use ts_check_prog for mdadm, readelf, file, ntpdate, bc (mdadm was
not always checked so far).

There are some positive side-effects. We are using always $PATH now
instead of randomly hardcoded /usr/bin, /sbin, etc. If we ever want
to change this again, we should do this generically in ts_init.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-05-15 12:48:35 +02:00
Ruediger Meier d1962aaec6 tests: add function ts_check_prog
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-05-15 12:00:59 +02:00
Karel Zak 37bc9a51c8 Merge branch 'travis-root-checks-v2' of https://github.com/rudimeier/util-linux
* 'travis-root-checks-v2' of https://github.com/rudimeier/util-linux:
  travis-ci: enable root checks
  travis-ci: minor cleanup and speedup
  tests: introduce TS_CMD_UUIDGEN (never use installed one)
  tests, don't write TS_DEVICE to stdout anymore
  tests: ts_scsi_debug_init must not run in a subshell
  tests: cleanup ts_scsi_debug_init
  tests: some more tests need loop support
  tests: ts_device_init requires loop support
  tests: use ts_check_losetup in losetup test
  tests: add function ts_check_losetup
  tests: ts_device_init remove useless error handling
2014-05-14 14:15:58 +02:00
Karel Zak 481f7f4e2a tests: add .BE hexdump test results (from s390)
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-14 14:05:54 +02:00
Karel Zak bb04c0773f Merge branch 'tests-known' of https://github.com/rudimeier/util-linux
* 'tests-known' of https://github.com/rudimeier/util-linux:
  tests, script/race is known to fail
  tests: script/race would work with variable loop count
  tests: ipcs/limits2 is known to fail
  tests: fix hexdump for big endian
  tests, add missing output for hexdump
  tests: fix hexdump, add ts_finalize
  tests: fix "KNOWN FAILED" for subtests
2014-05-14 13:19:37 +02:00
Karel Zak 85794fb0de losetup: fix -f on systems without /dev/loop-control
Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-14 12:53:24 +02:00
Ruediger Meier 6cae66ea45 tests, script/race is known to fail
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-05-13 20:11:27 +02:00
Ruediger Meier fcbc4db886 tests: script/race would work with variable loop count
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-05-13 20:11:24 +02:00
Ruediger Meier 857cc2244b tests: ipcs/limits2 is known to fail
See github issue #51, comment 2
https://github.com/karelzak/util-linux/issues/51

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-05-13 20:11:21 +02:00
Ruediger Meier 659203f2d8 tests: fix hexdump for big endian
For now endianess dependent subtests have undefined output on
BE systems until sombody re-checks this and provides expected
output files with .BE suffix.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-05-13 20:11:12 +02:00
Ruediger Meier 04a176eacd travis-ci: enable root checks
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-05-13 17:38:52 +02:00
Ruediger Meier 1ecee3d556 travis-ci: minor cleanup and speedup
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-05-13 17:38:48 +02:00
Ruediger Meier 0eb90ba264 tests: introduce TS_CMD_UUIDGEN (never use installed one)
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-05-13 17:38:45 +02:00
Ruediger Meier 07d9ed0a40 tests, don't write TS_DEVICE to stdout anymore 2014-05-13 17:38:41 +02:00
Ruediger Meier f45df374ff tests: ts_scsi_debug_init must not run in a subshell
ts_skip and ts_die won't work from subshell. Now we simply use
TS_DEVICE which is globally set in that function.

I've made sure that we never change TS_DEVICE variable after
we've got it. So we could use it again for cleanup on exit in
ts_{finalize,die,skip} functions.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-05-13 17:38:12 +02:00
Ruediger Meier dd761f7924 tests: cleanup ts_scsi_debug_init
Sort out global and local vars. Now we set TS_DEVICE globally
to be use later.
Skip really quiet if modprobe fails.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-05-13 17:37:28 +02:00
Ruediger Meier 296656464f tests: some more tests need loop support
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-05-13 17:37:23 +02:00
Ruediger Meier a5b45f2f34 tests: ts_device_init requires loop support
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-05-13 17:37:19 +02:00
Ruediger Meier 8fd00abd4a tests: use ts_check_losetup in losetup test
In losetup test we have to handle the special case that ts_check_losetup
requires a working losetup binary.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-05-13 17:37:15 +02:00
Ruediger Meier 5ec15aefbb tests: add function ts_check_losetup
Unfortunately losetup -f does not return an error nowadays.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-05-13 17:36:51 +02:00
Ruediger Meier 0981bedde6 tests, add missing output for hexdump
One file was missing and one was too much.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-05-13 15:39:35 +02:00
Ruediger Meier 800f4e2775 tests: fix hexdump, add ts_finalize
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-05-13 15:39:30 +02:00
Ruediger Meier 733094a851 tests: fix "KNOWN FAILED" for subtests
It didn't worked for tests with subtests.

Here we consolidate both cases which fixes the issue by the way. This
is basically a rewrite of 7641ccec.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-05-13 15:39:25 +02:00
Karel Zak 0f283438bf agetty: use the "best" interface for \4 and \6
The issue file escape sequences \4 and \6 prints the host IP when no
interface is specified. That's useless on some virtual machines where
gethostname()+getaddrinfo() returns 127.0.0.1.

The seems better to print IP of the "best" interface (UP, RUNNING, non-LOOPBACK)
and use gethostname() as painful fallback only.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1090935
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-13 15:23:42 +02:00
Karel Zak 9e147794ca lib/colors: add to the man page hint about $HOME stuff
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-13 13:27:03 +02:00
Karel Zak c6b3513942 agetty: fix odd check for chardev/tty
References: https://bugzilla.redhat.com/show_bug.cgi?id=1069902
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-13 12:28:48 +02:00
Karel Zak 538c18569e cfdisk: update man page COLORS section
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-13 12:13:02 +02:00
Karel Zak 496c979a09 fdisk: support colors customization
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-13 12:13:02 +02:00
Karel Zak 052e512a64 hexdump: add --color to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-13 12:13:02 +02:00
Karel Zak f4bc7f96a6 dmesg: support colors customization
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-13 12:13:02 +02:00
Karel Zak bb3c59dcb3 lib/colors: update man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-13 12:13:02 +02:00
Karel Zak 58ce71e63e hexdump: use new colors API
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-13 12:09:03 +02:00
Karel Zak 3eb482d027 libsmartcols: use new colors API
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-13 12:09:03 +02:00
Karel Zak 7a4704d826 lib/colors: support schemes customization
* parse terminal-colors.d/*.scheme files, expected format is

    <name> <color-sequence>

 * supported color sequences:

     - color name (e.g. "red")
     - dir_colors compatible xx;yy (e.g. 01;31) where the sequence may
       contains control chars like \e \a  ..etc.

 * scheme is parsed on demand

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-13 12:09:03 +02:00
Karel Zak e66a662726 lib/colors: allow to temporary disable colors
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-13 12:09:02 +02:00
Karel Zak 570b32100f lib/colors: add support for @term and /home/kzak
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-13 12:09:02 +02:00