* setup logindefs loader by function rather than by global pointer
* move basic booleans to the su_context struct
Signed-off-by: Karel Zak <kzak@redhat.com>
Yes, I know... this patch is horrible. We all hate this in git
history, but the original indention from coreutils has been so
crazy...
Signed-off-by: Karel Zak <kzak@redhat.com>
uuidgen: Add hash-based UUIDs to bash-completion. These were added in
commit c6f1ec68a8.
wipefs: Command started to use libsmartcols, and it got some new options.
Commit d9921b2a12.
rename: New option was added in commit fabb90676a.
tunelp: The --trust-irq was removed it being years broken. Commit
d52eb4bd90.
setpriv: Add --ambient-caps option from commit 0c92194eee.
In same go fix 'bash set -u' issue, that is the same as mentioned commit
abbcec4fc9.
hwclock: For some reason --get has always been missing from this file.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The mount man page assumes locking errors mapped to MNT_EX_FILEIO (16)
return code. Unfortunately, this is internally not exported as a
special error code, so it's returned as a generic (errno based)
stuff. This patch fixes this issue.
Note that we still use locking for example for utab or when enabled
/etc/mtab (disabled by default).
Signed-off-by: Karel Zak <kzak@redhat.com>
Attempt to fsync() this device returns EINVAL, causing the rfkill always to
return EXIT_FAILURE when either block or unblock is requested. Simply
closing the file descriptor will fix the issue.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
There is no reason why multiple arguments could not be supported.
Most common use case is to do multiple control commands in one go without us
of 'all' argument that can cause unnecessary connection breakage. For
example someone might want to add to a system initialization following
commands.
rfkill block bluetooth uwb wimax wwan gps fm nfc
That will ensure everything but wifi is turned off with as few commands as
possible, without killing wifi at any point.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* call wait() only when child exited
* suspend all session (including script master process) when child get
SIGSTOP and send SIGCONT to child when master process resume
This allows to suspend all session and later use "fg" shell command to
resume.
$ ps af
14722 pts/1 Ss 0:00 bash
4870 pts/1 S+ 0:00 \_ ./script
4871 pts/6 Ss+ 0:00 \_ bash -i
$ kill -SIGSTOP 4871
and script session on another terminal:
$ script
Script started, file is typescript
$
[1]+ Stopped ./script
$ fg 1
./script
... session again usable ...
^D
Script done, file is typescript
Signed-off-by: Karel Zak <kzak@redhat.com>
Adding V3 and V5 UUIDs per RFC-4122.
[kzak@redhat.com: - fix symbols file]
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Special exit handling is not wanted for usage() or bad
command syntax. For example we do not want to audit:
hwclock --set --date foo
Signed-off-by: J William Piggott <elseifthen@gmx.com>
sysexits.h was introduced in v2.11t prior to util-linux-ng, with the
HISTORY entry: * hwclock: minor polishing.
So there was no specific issue solved by adding it. Its use was never
documented so it should be safe to remove.
Also, fix return values being used for the exit status that were not
magic constants (portability issue).
Signed-off-by: J William Piggott <elseifthen@gmx.com>
* move list with offsets specified by -o to the wipe_control struct
* don't clone the list of offsets, just keep it simple and stupid
* apply all filters (-o and -t) in get_desc_for_probe()
* always return offset and len by get_desc_for_probe() and apply
always use libblkid hide & step-back
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1486777
Signed-off-by: Karel Zak <kzak@redhat.com>
* 'rfkill' of git://github.com/kerolasa/lelux-utiliteetit: (57 commits)
rfkill: add systemd-rfkill(8) see also segment
rfkill: check id number refers to a device that exists
rfkill: use back and forward compatible test
rfkill: add bash-completion file
rfkill: inform in syslog when rfkill is invoked
rfkill: use human readable timestamps in event output
rfkill: use libsmartcols output
rfkill: do not ignore read error
rfkill: clarify 'all devices' handling
rfkill: update manual page
rfkill: make programming style to match util-linux project
rfkill: make command to build in util-linux project
rfkill: move files to appropriate locations
add python module
use uapi rfkill.h
version 0.5
fix compiler warning
Add NFC support
version 0.4
Add rfkill type "fm" to the man page.
...
Earlier all commands happily accepted without detecting failure when
none-existing id number was used. For example:
$ rfkill block 2017; echo $?
0
The same input after this change looks following.
$ rfkill block 2017; echo $?
rfkill: invalid identifier: 2017
1
Signed-off-by: Sami Kerola <kerolasa@iki.fi>