1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-26 17:27:41 +03:00
Commit Graph

673 Commits

Author SHA1 Message Date
Yu Watanabe
f80d6b9304 bash-completion/busctl: support wait command
Follow-up for 30465af656.
2024-10-14 09:39:38 +01:00
Ronan Pigott
30465af656 busctl: add wait verb to wait for signals
It's like busctl call, but it waits for a signal rather than a reply to
a method call.
2024-10-12 19:30:56 -07:00
Yu Watanabe
f1c16ca6d6 shell-completion/analyze: add has-tpm2 2024-09-19 19:08:49 +09:00
Daan De Meyer
615226abd8 Revert "nspawn: Allow specifying custom init program"
I don't actually need this anymore since we're going with a
unit based approach for the containers stuff internally so
let's just revert it.

Fixes #34085

This reverts commit ce2291730d.
2024-08-22 22:20:42 +02:00
Yu Watanabe
5703301ada resolvectl: introduce --no-ask-password option 2024-08-19 11:36:22 +09:00
Yu Watanabe
21f31f23cc networkctl: introduce --no-ask-password option 2024-08-19 11:28:22 +09:00
bryango
3ceb4d2438 shell-completion: zsh: fix incorrect unescaping
Previously the `_filter_units_by_property` completion function
outputs with a [zsh parameter expansion flag] `g`. This means
that the returned result is unescaped as the zsh builtin `echo`,
except that octal escapes don’t take a leading zero. This seemed to
have worked back in the days when it was first introduced:

  6c9414a700

But it now leads to incorrect over-unescaping; for example,

  system-systemd\\x2djournald.slice (correct)

is incorrectly completed by zsh in commands such as
`systemctl kill`:

  system-systemd-journald.slice (incorrect)

This commit fixes such problems by removing the `g` flag.

See:
[zsh parameter expansion flag]: https://zsh.sourceforge.io/Doc/Release/Expansion.html#Parameter-Expansion-Flags
2024-08-15 20:28:12 +02:00
Lukas Nykryn
fe5a6c47af systemd-run: add unit and invocation_id JSON output 2024-08-12 20:19:01 +02:00
Luca Boccassi
702d74b62a busctl: add --num-matches= for monitor verb
Useful in scripts when one wants to wait for a specific
signal before continuing
2024-08-09 12:12:28 +01:00
Luca Boccassi
989e843e75 busctl: add support for --timeout to monitor verb
Useful in scripts when you want to exit successfully after a certain time
2024-08-08 09:18:41 +01:00
Daan De Meyer
ce2291730d nspawn: Allow specifying custom init program
This allows for example forcing to use /sbin/init instead of always
using /usr/lib/systemd/systemd if it exists. Or it allows using a
different path altogether.
2024-08-06 23:00:17 +02:00
rajmohan r
1592d2f900 systemd-analyze: Add svg scaling options
+ Scale the x-axis of the resulting plot by a factor (default 1.0)
+ Add activation timestamps to each bar

Signed-off-by: rajmohan r <rajmohan.r@kpit.com>
2024-08-05 15:23:44 +02:00
Yu Watanabe
40d90c9c01 localectl: introduce -l/--full option
Closes #33906.
2024-08-02 09:33:46 +02:00
Yu Watanabe
7d3ae6b213 journalctl: add --list-invocations command and -I/--invocation options
The --list-invocations command is similar to --list-boots, but shows
invocation IDs of specified unit. This should be useful when showing
a specific invocation of a unit.

The --invocation option is similar to --boot, but takes a invocation ID
or an offset. The -I option is equivalent to --invocation=0.
2024-08-01 07:31:44 +09:00
Zbigniew Jędrzejewski-Szmek
e520b1258c
Merge pull request #30307 from bluca/enforce_inhibitors
logind: always check for inhibitor locks
2024-07-26 13:52:34 +02:00
Luca Boccassi
9ce9dece4f shell completion: add support for sd-analyze capability --mask
Follow-up for 3e7a029c28
2024-07-25 13:22:27 +01:00
Luca Boccassi
804874d26a logind: always check for inhibitor locks
Currently inhibitors are bypassed unless an explicit request is made to
check for them, or even in that case when the requestor is root or the
same uid as the holder of the lock.

But in many cases this makes it impractical to rely on inhibitor locks.
For example, in Debian there are several convoluted and archaic
workarounds that divert systemctl/reboot to some hacky custom scripts
to try and enforce blocking accidental reboots, when it's not expected
that the requestor will remember to specify the command line option
to enable checking for active inhibitor locks.

Also in many cases one wants to ensure that locks taken by a user are
respected by actions initiated by that same user.

Change logind so that inhibitors checks are not skipped in these
cases, and systemctl so that locks are checked in order to show a
friendly error message rather than "permission denied".

Add new block-weak and delay-weak modes that keep the previous
behaviour unchanged.
2024-07-25 12:22:36 +01:00
Collin L
733518b413
zsh/_networkctl: remove duplicated argument for completion (#31926)
It is unnecessary, which will mess the completion.
2024-07-22 10:36:47 +01:00
Ronan Pigott
09a8a0d023 zsh: update varlinkctl completions
correct redundant or mismatched tags and fill the argument field of
curcontext because _regex_words does not do that for us.

The _complete_help text now looks much more reasonable most of the time:

$ varlinkctl call /run/systemd/resolve/io.systemd.Resolve ^Xh
tags in context :completion::complete:varlinkctl::
    argument-rest  (_arguments _varlinkctl)
tags in context :completion::complete:varlinkctl-call:method:
    varlink-methods  (_varlinkctl_cmd _varlinkctl_command _arguments _varlinkctl)

Fixes: af63b4b769 ("zsh: add varlinkctl completions")
2024-07-19 23:07:37 +02:00
Ronan Pigott
af63b4b769 zsh: add varlinkctl completions 2024-07-19 17:06:17 +02:00
Luca Boccassi
09edabe96a id128: add 'var-partition-uuid' verb
As per DPS the UUID for /var/ should be keyed by the local machine-id,
which is non-trivial to do in a script. Enhance 'systemd-id128' to
take 'var-partition-uuid' as a verb, and if so perform the
calculation.
2024-07-17 18:05:40 +02:00
Ronan Pigott
ef98603f4b zsh: add run0 completions 2024-07-04 01:21:43 +02:00
Kamil Szczęk
e262205eb7 cryptenroll: support for enrolling FIDO2 tokens in manual mode
systemd-cryptsetup supports a FIDO2 mode with manual parameters, where
the user provides all the information necessary for recreating the
secret, such as: credential ID, relaying party ID and the salt. This
feature works great for implementing 2FA schemes, where the salt file
is for example a secret unsealed from the TPM or some other source.
While the unlocking part is quite straightforward to set up, enrolling
such a keyslot - not so easy. There is no clearly documented
way on how to set this up and online resources are scarce on this topic
too. By implementing a straightforward way to enroll such a keyslot
directly from systemd-cryptenroll we streamline the enrollment process
and reduce chances for user error when doing such things manually.
2024-06-20 14:26:24 +02:00
Ludwig Nussel
8ce171bf51 bootctl: add --random-seed=yes/no 2024-06-20 14:26:13 +09:00
David Tardon
bde35f4a91 shell-completion: only offer devices for completion
This skips directories and other stuff like /dev/core, /dev/initctl or
/dev/log.
2024-06-13 00:03:25 +09:00
Yu Watanabe
18200b426e shell-completion: update bash completion for networkctl 2024-06-11 10:35:55 +01:00
Yu Watanabe
ba5e44e26b shell-completion: update bash-completion for udevadm
- Add missing options.
- Show device nodes when supported.

Closes #33265.
2024-06-11 10:35:29 +01:00
Arthur Zamarin
27e49748ca
shell-completion: add systemd-vmspawn to meson.build
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2024-05-18 09:38:53 +03:00
Arthur Zamarin
02132022b0
shell-completion: add missing args to bash systemd-nspawn
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2024-05-18 09:34:38 +03:00
Arthur Zamarin
030b2c8490
shell-completion: add missing args to bash systemd-run
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2024-05-18 09:34:38 +03:00
hydrargyrum
5ebd945cda shell-completion: on zsh, systemd-cat is a precommand
_precommand lets zsh complete other commands and their arguments
e.g. it can complete grep with "systemd-cat gr" and complete grep options
with "systemd-cat grep -"
2024-05-09 13:25:32 +02:00
Arthur Zamarin
3b18a8795d
shell-completion: add bash completion for systemd-vmspawn
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2024-05-01 20:47:59 +03:00
Arthur Zamarin
5db2bf1b30
shell-completion: add missing args to zsh resolvectl
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2024-05-01 19:17:59 +03:00
Arthur Zamarin
4a06acda25
shell-completion: add missing args to bash resolvectl
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2024-05-01 19:17:59 +03:00
Arthur Zamarin
84de79e829
shell-completion: add missing args to bash systemd-analyze
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2024-05-01 19:17:59 +03:00
Arthur Zamarin
e833f57c42
shell-completion: add bash-completion for systemd-vpick command
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2024-04-26 18:45:13 +03:00
Arthur Zamarin
9e0f94ace1
shell-completion: add bash-completion for run0 command
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2024-04-26 18:45:13 +03:00
Arthur Zamarin
2055011a19
shell-completions: install new completions which were forgotten
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2024-04-26 18:45:13 +03:00
Arthur Zamarin
3eb329bfb5
shell completion: fix machinectl import-{tar,raw}
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2024-04-26 12:10:30 +03:00
Arthur Zamarin
35dcdca0ed
shell completion: add bash completion for importctl
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2024-04-26 12:07:53 +03:00
Luca Boccassi
b84a0bf3ab
Merge pull request #32144 from bluca/portable_clean
portablectl: add --clean parameter for detaching
2024-04-18 18:15:20 +02:00
Luca Boccassi
ef5f7f9437 systemctl: add --clean= values to documentation and shell completion 2024-04-18 14:07:07 +02:00
Luca Boccassi
d3322c1fdb bash completion: add missing parameters for portablectl 2024-04-18 10:47:29 +01:00
Luca Boccassi
966d7977c7 portablectl: add --clean parameter for detaching
Calls CleanUnit on each portable service being removed, after it has
stopped
2024-04-18 10:47:29 +01:00
Eisuke Kawashima
20927c0eec
improve zsh completion (#32098)
* fix error
* remove options that are no longer supported
* add missing options
* stop completion if an option `--help` or `--version` is supplied

[[[
zjs: a note for the reader:

zshcompsys(1) in the section about optspecs in _arguments says:

> Each of the forms above may be preceded by a list in parentheses of option names  and  argument  num‐
> bers.  If the given option is on the command line, the options and arguments indicated in parentheses
> will not be offered.  For example, ‘(-two -three 1)-one:...' completes the option ‘-one'; if this ap‐
> pears  on  the  command line, the options -two and -three and the first ordinary argument will not be
> completed after it.  ‘(-foo):...' specifies an ordinary argument completion; -foo will  not  be  com‐
> pleted if that argument is already present.
> 
> Other  items  may  appear in the list of excluded options to indicate various other items that should
> not be applied when the current specification is matched: a single star (\*) for  the  rest  arguments
> (i.e. a specification of the form ‘\*:...'); a colon (:) for all normal (non-option-) arguments; and a
> hyphen (-) for all options.  For example, if ‘(\*)' appears before an option and the option appears on
> the  command  line,  the  list  of remaining arguments (those shown in the above table beginning with
> ‘\*:') will not be completed.

The intended effect of the change is to remove irrelevant completion matches from the completion.

tl;dr: (- : ) prevents further completion
]]]
2024-04-15 10:58:48 +02:00
samuelvw01
3623a7ea83 Update _udevadm 2024-03-16 21:51:56 +09:00
Luca Boccassi
ab16e4852e shell completion: add --copy=mixed in portablectl
Follow-up for 82047a6aa7
2024-03-16 00:11:41 +09:00
Mike Yuan
cd804013a6 shell-completion: add systemd-cat --namespace=
Follow-up for 45bcab66a9

Addresses https://github.com/systemd/systemd/pull/31754#discussion_r1524715062
2024-03-14 13:07:19 +00:00
Adrian Vovk
793ceda177 user-record: Add preferredSession{Type,Launcher}
These will be used by display managers to pre-select the user's
preferred desktop environment and display server type. On homed, the
display manager will also be able to set these fields to cache the
user's last selection.
2024-03-01 16:28:10 +00:00
Zbigniew Jędrzejewski-Szmek
ab95ba1558
Merge pull request #31511 from jamacku/prepare-for-diff-shellcheck
Prepare for new version of Differential ShellCheck & scanning of shell completion scripts
2024-02-28 10:28:56 +01:00