1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 00:51:24 +03:00
Commit Graph

225 Commits

Author SHA1 Message Date
Luca Boccassi
6faecbd353 systemctl: add new option to mount image inside a running service namespace
Use the new DBUS method and follow the same pattern as the
systemctl bind command.
2021-01-21 19:08:40 +00:00
Luca Boccassi
5e8deb94c6 core: add DBUS method to bind mount new nodes without service restart
Allow to setup new bind mounts for a service at runtime (via either
DBUS or a new 'systemctl bind' verb) with a new helper that forks into
the unit's mount namespace.
Add a new integration test to cover this.

Useful for zero-downtime addition to services that are running inside
mount namespaces, especially when using RootImage/RootDirectory.

If a service runs with a read-only root, a tmpfs is added on /run
to ensure we can create the airlock directory for incoming mounts
under /run/host/incoming.
2021-01-18 17:24:05 +00:00
Felix Stupp
4327574fc1 Added option --check-inhibitors for non-tty usage
As described in #2680, systemctl did ignore inhibitors if it is not
attached to a tty to allow scripts to ignore inhibitors automatically.
This pull request preserves this behavior but allows scripts to
explicit check inhibitors if required.

The new parameter '--check-inhibitors=yes' enables this feature.
The old parameter '-i'/'--ignore-inhibitors' was deprecated in favor
of '--check-inhibitors=no', the default behaviour can be specified
with '--check-inhibitors=auto'.
The new parameter is also described in the documentations and shell
completions found here.
2021-01-13 16:07:36 +01:00
Zbigniew Jędrzejewski-Szmek
341992081b shell-completion: fix systemctl set/unset/import-environment
unset-environment is completed with variable names in the environment block.
set-environment the same, but suffixed with "=".
import-environment is completed with variable names in the client environment.
2021-01-08 20:01:40 +01:00
Yu Watanabe
db9ecf0501 license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
Ronan Pigott
0fb8f02506 zsh: loginctl: complete alias 'self' 2020-09-30 09:24:03 +02:00
Ronan Pigott
cf18af825a zsh: add systemd-path completions 2020-09-23 10:07:14 +02:00
Olivier Le Moal
50574ed1ac add "list" verb to autocompleted commands 2020-08-27 10:01:36 +02:00
Olivier Le Moal
6ff45bc1a1 shell-completion/zsh: add missing verbs for networkctl 2020-08-26 16:03:35 +02:00
Ronan Pigott
45b156c155 zsh: correct journalctl command completion parsing 2020-08-25 09:29:13 +02:00
Luca Boccassi
46ad9c5378 systemctl: add --timestamp to change timestamp print format
Timestamps for unit start/stop are recorded with microsecond granularity,
but status and show truncate to second granularity by default.
Add a --timestamp=pretty|us|utc option to allow including the microseconds
or to use the UTC TZ to all timestamps printed by systemctl.
2020-08-19 15:30:13 +01:00
Zbigniew Jędrzejewski-Szmek
8f0a346a29 shell-completions: update bootctl
Entries in the completion lists are reordered to follow --help output:
this makes it much easier to see what is missing.
2020-05-30 16:04:43 +02:00
codicodi
d0192e93f8 Update resolvectl zsh completion 2020-05-21 14:06:58 +02:00
Ronan Pigott
4b6d94a1e5 shell-completion/zsh: update systemd-analyze completions 2020-04-27 08:40:15 +02:00
Haochen Tong
f5b3be308d zsh: fix disable/enable completion
The "preset" column introduced in
b01c1f305c breaks zsh completion for
systemctl disable/enable. Fix by ignoring everything after the last
space in a line.
2020-04-27 08:12:27 +02:00
Jouke Witteveen
1cabd2d0c5 systemctl: hide first column with --plain instead of --no-legend
Hiding the first column, which may contain bullet circles, with --no-legend
is undocumented and potentially unexpected. On the other hand, not printing
bullet circles with --plain is documented so hiding the column with that
switch is sensible.

The combination "--full --no-legend --no-pager --plain" is appropriate for
automated processing of systemctl output.
2020-04-17 19:15:49 +02:00
Pieter Lexis
72e1c0b308 Add shell to machinectl ZSH completion 2020-03-27 18:15:15 +01:00
Daniel Shahaf
356873ddec zsh: Complete systemctl subcommands in separate tags
Fixes #14422
2020-01-08 09:43:01 +01:00
Daniel Shahaf
fa7ea86510 zsh: Prepare for classifying systemctl commands (#14422) 2019-12-23 17:17:31 +00:00
Daniel Shahaf
1d8385b415 zsh: Complete more systemctl commands
The completion is now synced with the manual.
2019-12-23 16:49:51 +00:00
Daniel Shahaf
51a3b72634 zsh: Group systemctl subcommands as in the manual. No functional change. 2019-12-23 16:44:28 +00:00
Zbigniew Jędrzejewski-Szmek
a232ebcc2c core: add support for RestartKillSignal= to override signal used for restart jobs
v2:
- if RestartKillSignal= is not specified, fall back to KillSignal=. This is necessary
  to preserve backwards compatibility (and keep KillSignal= generally useful).
2019-10-02 14:01:25 +02:00
Ronan Pigott
4f6c727637 zsh: udpate bootctl completions 2019-09-13 14:38:05 +02:00
Ronan Pigott
3005b38056 zsh: update journalctl completions 2019-08-28 10:08:49 +02:00
Zbigniew Jędrzejewski-Szmek
15e19aa1fc
Merge pull request #13273 from RPigott/zshcomp
Enable resolvectl zsh completions
2019-08-14 18:21:12 +02:00
Ronan Pigott
e4e4e4954c shell-completion: complete --match argument for busctl 2019-08-13 20:27:56 -07:00
Ronan Pigott
161719d50c zsh: add busctl completions 2019-08-10 01:21:35 -07:00
Ronan Pigott
24c55b6767 shell-completion: add resolvectl commands to zsh completion 2019-08-06 22:50:06 -07:00
Ronan Pigott
f65ccde2c1 shell-completion: enable resolvectl zsh completion 2019-08-06 22:49:44 -07:00
Zbigniew Jędrzejewski-Szmek
c4e7664d24 zsh: add completion for systemctl preset-all 2019-06-12 17:27:19 +02:00
Douglas Christman
f003d62ec6 zsh-completion: fix completion for systemd-inhibit --what 2019-05-28 10:04:42 +02:00
Zbigniew Jędrzejewski-Szmek
c1072f6473 shell-completion/zsh: add -*type*- headers
Since there's no file extension, emacs and other editors do not know that this is
supposed to be in shell syntax.
2019-04-12 08:36:18 +02:00
Zbigniew Jędrzejewski-Szmek
843cfcb15c shell-completion: use 4 space indentation too
The same as in other places, indentation levels were all over the place.
2019-04-12 08:34:44 +02:00
Jörg Sommer
a505736536 completion/zsh/journalctl: Add --no-hostname 2019-03-26 07:59:30 +01:00
Jörg Sommer
d9e15cbd18 journalctl: New option --cursor-file
The option cursor-file takes a filename as argument. If the file exists and
contains a valid cursor, this is used to start the output after this position.
At the end, the last cursor gets written to the file.

This allows for an easy implementation of a timer that regularly looks in the
journal for some messages.

    journalctl --cursor-file err-cursor -b -p err
    journalctl --cursor-file audit-cursor -t audit --grep DENIED

Or you might want to walk the journal in steps of 10 messages:

    journalctl --cursor-file ./curs -n10 --since=today -t systemd
2019-02-27 18:43:31 +01:00
dana
c501ecd70c zsh completion: Prevent functions from clobbering each other, &c.
- Don't redefine helpers on every call
- Prefix helper names with main function name
- Adjust some helper names for consistency and convention adherance
2019-01-08 15:23:37 +01:00
Paul Seyfert
0e9ab1af64 zsh/coredumpctl: don't print warnings from completion function 2018-12-31 21:27:09 +01:00
Paul Seyfert
ffc7a6e931 zsh/coredumpctl: offer --quiet 2018-12-26 14:02:06 +01:00
Paul Seyfert
10dd7e746b zsh/coredumpctl: offer --directory option
After `-D <TAB>` and `--directory=<TAB>` _directories is called to
suggest directories.
2018-12-25 22:57:23 +01:00
Paul Seyfert
ddc052dc4e zsh/coredumpctl: complete argument for --debugger=
This way external commands (i.e. executables in the PATH) are suggested
at --debugger=<TAB>. Upon starting a path (e.g. --debugger=/<TAB> or
--debugger=./<TAB>), filenames of executables are completed.
2018-12-25 19:30:50 +01:00
Xuanwo
c4a2deba7e zsh-completion: Add support for set-property (#10322) 2018-11-20 13:17:11 +09:00
Elias Probst
adb4c246c1
zsh-completion: typo (proerties > properties) 2018-11-16 13:27:56 +00:00
Elias Probst
ed251bf26b
zsh-completion: complete available, not running machines for clone 2018-11-16 13:27:02 +00:00
Lennart Poettering
8e04444385 journalctl: port JSON output mode to new JSON API
Also, while we are at it, beef it up, by adding json-seq support (i.e.
https://tools.ietf.org/html/rfc7464). This is particularly useful in
conjunction with jq's --seq switch.
2018-10-11 17:25:27 +02:00
Jan Pokorný
53956faf74 shell-completion: replace "gdb" verb with "debug" for coredumpctl
Also offer --debugger option.  Both to reflect changes in v239.
2018-08-20 09:43:44 +02:00
Jon Ringle
fbb48d4c66 Make final kill signal configurable
Usecase is to allow changing the final kill from SIGKILL to SIGQUIT which
should create a core dump useful for debugging why the service didn't stop
with the SIGTERM
2018-07-23 13:44:54 +02:00
Yu Watanabe
cbed8ff5a1 meson: drop redundant messages 2018-07-10 23:24:39 -07:00
Zbigniew Jędrzejewski-Szmek
0cd41d4dff Drop my copyright headers
perl -i -0pe 's/\s*Copyright © .... Zbigniew Jędrzejewski.*?\n/\n/gms' man/*xml
git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/(#\n)?# +Copyright © [0-9, -]+ Zbigniew Jędrzejewski.*?\n//gms'
git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s*\/\*\*\*\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*?\s*\*\*\*\/\s*/\n\n/gms'
git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*//gms'
2018-06-14 13:03:20 +02:00
Lennart Poettering
96b2fb93c5 tree-wide: beautify remaining copyright statements
Let's unify an beautify our remaining copyright statements, with a
unicode ©. This means our copyright statements are now always formatted
the same way. Yay.
2018-06-14 10:20:21 +02:00
Emil Velikov
4ed141166c zsh-completion: systemctl: list template units only as needed
Currently the completion adds template units for commands such as
is-active, is-failed, is-enabled, status, show and others.

At the same time systemctl barfs at us, since an instanced template unit
is needed. Follow the example list from bash-completion as to which
commands should not list template units.

Note: The above is observed regardless of DefaultInstance.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2018-06-11 19:02:36 +01:00