1
0
mirror of https://github.com/systemd/systemd synced 2024-07-08 20:15:55 +00:00
Commit Graph

649 Commits

Author SHA1 Message Date
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
Lennart Poettering
caf6bd166f homed: default to "btrfs" as fs type in the LUKS backend
Apparently both Fedora and suse default to btrfs now, it should hence be
good enough for us too.

This enables a bunch of really nice things for us, most importanly we
can resize home directories freely (i.e. both grow *and* shrink) while
online. It also allows us to add nice subvolume based home directory
snapshotting later on.

Also, whenever we mention the three supported types, alaways mention
them in alphabetical order, which is also our new order of preference.
2020-08-19 15:46:07 +02:00
Yu Watanabe
e4f8d5e01f shell-completion: add missing verbs for networkctl 2020-06-30 08:56:36 +02:00
Luca Boccassi
c2923fdcd7 dissect/nspawn: add support for dm-verity root hash signature
Since cryptsetup 2.3.0 a new API to verify dm-verity volumes by a
pkcs7 signature, with the public key in the kernel keyring,
is available. Use it if libcryptsetup supports it.
2020-06-25 08:45:21 +01:00
Zbigniew Jędrzejewski-Szmek
3a9692dd05 shell-completion: add homectl for bash
The difference between verbs that take one user and multiple users is not
handled. I don't know how to do this.
2020-06-05 16:34:18 +02: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
Luca Boccassi
e2c1ddcc49 portablectl: add --now and --enable to attach/detach
Add shortcuts to enable and start, or disable and stop, portable
services with a single portablectl command.
Allow to pass a filter on detach, as it's necessary to call
GetImageMetadata to get the unit names associated with an image.

Fixes #10232
2020-02-07 17:09:05 +01:00
Yu Watanabe
e2268fa437 bash-completion: do not ellipsize machine name 2020-01-10 12:29:02 +09:00
Yu Watanabe
2a6c483b8c bash-completion: busctrl: support --full command line option 2020-01-10 12:22:08 +09:00
Yu Watanabe
6c64cf8859 bash-completion: networkctl: do not show ellipsized link name 2020-01-10 12:13:12 +09:00
Yu Watanabe
0ca1926ec3 bash-completion: networkctl: support --full and --lines 2020-01-09 15:43:18 +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
Yu Watanabe
4171837be6 bash-completion: move shell-completion for log-level or friends to systemctl 2019-12-21 19:23:02 +01: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
Yu Watanabe
82d1264048
Merge pull request #11883 from yuwata/network-dhcp-renew
network: dhcp renew
2019-09-22 07:44:23 +02:00
Yu Watanabe
308e7dfdce networkctl: add renew command 2019-09-21 20:27:43 +09:00
Ronan Pigott
4f6c727637 zsh: udpate bootctl completions 2019-09-13 14:38:05 +02:00
Yu Watanabe
6552c29edb shell-completion: do not truncate suggestions 2019-09-01 17:32:14 +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
Yu Watanabe
7c6de13f1b bash-completion: support "systemd-analyze exit-status" 2019-07-30 16:45:21 +02:00
Yu Watanabe
0a0564a1b5 bash-completion: support ntp-servers and revert command for timedatectl 2019-07-17 06:59:12 +09:00
Yu Watanabe
8b693c634d bash-completion: add missing 'systemd-analyze timestamp' 2019-07-16 01:15:57 +09:00
Yu Watanabe
7ce7278217 bash-completion: udevadm: list all possible values for --action option 2019-06-29 04:10:14 +09:00
Yu Watanabe
cc82851c0d bash-completion: support systemd-analyze condition 2019-06-28 10:04:38 +02:00
Iwan Timmer
4310bfc20b resolved: add strict mode for DNS-over-TLS
Add strict mode for DNS-over-TLS, which will require TLS support from the server. Closes #10755
2019-06-19 13:10:44 +02:00
Zbigniew Jędrzejewski-Szmek
c4e7664d24 zsh: add completion for systemctl preset-all 2019-06-12 17:27:19 +02:00
Yu Watanabe
ca866a32fb bash-completion: support "networkctl delete" 2019-06-04 12:00:49 +02:00
Yu Watanabe
ae760f4b16 udevadm: add --wait-for-initialization option to "udevadm info" 2019-06-04 01:28:30 +09:00
Yu Watanabe
94a58cc1f9 bash-completion: support --stats/-s option of networkctl 2019-06-01 10:24:47 +09:00
Frantisek Sumsal
cec82cb943 bash-completion: correctly react to an unescaped unit name 2019-05-30 14:30:59 +02:00
Douglas Christman
f003d62ec6 zsh-completion: fix completion for systemd-inhibit --what 2019-05-28 10:04:42 +02:00
Yu Watanabe
2789437be5 bash-completion: update options for bootctl 2019-05-28 09:49:57 +02:00
Frantisek Sumsal
afa879c3b4 bash-completion: accept files for --bind/--bind-ro options 2019-04-26 08:06:23 +02:00
Frantisek Sumsal
babf4f68fc bash-completion: process only non-template units for systemctl isolate 2019-04-26 08:05:05 +02:00
Frantisek Sumsal
f8f542482e bash-completion: don't sort syslog priorities
By default, the available completions are sorted alphabetically, which
is counterproductive in case of syslog priorities. Override the default
behavior using the `nosort` option
2019-04-26 08:04:15 +02:00
Frantisek Sumsal
9521d5582b bash-completion: unify indentation 2019-04-24 18:03:30 +02:00
Frantisek Sumsal
72c9177db2 bash-completion: properly autocomplete escaped unit names 2019-04-24 18:03:15 +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
Frantisek Sumsal
c01dbf6d19 bash-completion: unify indentation 2019-03-23 21:51:04 +01:00
Frantisek Sumsal
1413763ea5 bash-completion: use default completion for redirect operators 2019-03-23 21:50:50 +01:00
Yu Watanabe
58a6c57b75 bash-completion: add systemd-id128 support 2019-03-15 18:54:53 +09:00
Yu Watanabe
ca66b69d5b bash-completion: also suggest units in reloading or activating
Closes #11942.
2019-03-12 11:25:26 +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
Yu Watanabe
23bedfbc32 bash-completion: busctl: add 'emit' command support 2019-02-06 13:30:53 +01:00
Yu Watanabe
f77bb3a3bd bash-completion: udevadm: support recently added options 2019-01-18 16:10:01 +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
Zbigniew Jędrzejewski-Szmek
0e89eb474d Merge pull request #10221 from lucaswerkmeister/bash-completion
Merged locally to resolve a conflict. The redirection of error is required to
suppress "# Not showing unlisted system calls, ...".
2018-12-18 14:53:58 +01:00
Yu Watanabe
1f7951241f bash-completion: also suggests device units
Follow-up for b6854081ff.
2018-12-17 14:44:58 +09:00
Yu Watanabe
19582502c0 bash-completion: udevadm: suggest argument for several options 2018-12-17 14:44:00 +09:00
Yu Watanabe
d5acf7da91 bash-completion: fix __get_interfaces() 2018-12-17 11:13:15 +09:00
Zbigniew Jędrzejewski-Szmek
57db447ebf
Merge pull request #11147 from yuwata/bash-completion-machinectl
bash-completion: adds import-fs for machinectl and suggest more
2018-12-14 08:57:03 +01:00
Yu Watanabe
f675a1f005 bash-completion: busctl: support --json and -j option 2018-12-14 08:55:38 +01:00
Yu Watanabe
ff1cf894d2 bash-completion: nspawn: support recently added options 2018-12-14 03:18:33 +09:00
Yu Watanabe
223f58ba8d bash-completion: run: support recently added options 2018-12-14 03:18:33 +09:00
Yu Watanabe
2e68a49dc8 bash-completion: systemctl: use --output=help to show suggestions 2018-12-14 02:33:21 +09:00
Yu Watanabe
fdc33681ae bash-completion: journalctl: use --output=help to show suggestions 2018-12-14 02:33:21 +09:00
Yu Watanabe
d104486ab6 bash-completion: journalctl: drop deprecated --new-id128 option 2018-12-14 02:33:21 +09:00
Yu Watanabe
3b59e2cbed bash-completion: loginctl: suggest argument for --machine option 2018-12-14 02:22:40 +09:00
Yu Watanabe
dfeebf55d9 bash-completion: loginctl: suggest argument for --output option 2018-12-14 02:18:35 +09:00
Yu Watanabe
fad73e9deb bash-completion: machinectl: suggest arguments for --verify and --format
This also changes to use '--output=help' for suggesting arguments of
--output option.
2018-12-14 02:18:24 +09:00
Yu Watanabe
0e5bea97e9 bash-completion: machinectl: support import-fs 2018-12-14 01:52:48 +09:00
Yu Watanabe
a73b2f4ab3 bash-completion: bootctl: support set-default and set-oneshot 2018-12-14 01:26:52 +09:00
Yu Watanabe
ed0c5a6f89 bash-completion: bootctl: suggest argument for --path option 2018-12-14 01:26:25 +09:00
Yu Watanabe
8ed22786aa bash-completion: bootctl: add one missing option 2018-12-14 01:25:31 +09:00
Yu Watanabe
83da42c3bf bash-completion: analyze: support 'security' 2018-12-07 08:05:18 +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
Yu Watanabe
cb39201e72 bash-completion: analyze: add timespan
Follow-up for 3f1c1287a9.
2018-10-23 22:28:42 +09: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
Lucas Werkmeister
2431ca22bc bash-completion: analyze: complete system call sets 2018-09-30 22:27:27 +02:00
Yu Watanabe
f28255e2d5 bash-completion: systemctl: re-implement __filter_units_by_properties()
This also unifies __filter_units_by_property() and
__filter_units_by_properties(), and makes completion for 'restart',
'reload' or 'stop' show more candidates.
2018-09-12 14:17:22 +09: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
Yu Watanabe
652e39a378 bash-completion: journalctl: add --grep and --case-sensitive 2018-08-08 15:26:38 +09: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
25612ecba4 tree-wide: drop copyright lines for more authors
Acks in https://github.com/systemd/systemd/issues/9320.
2018-06-22 16:39:45 +02:00
Yu Watanabe
5c46878eda bash-completion: support 'timedatectl show' 2018-06-21 10:47:51 +09:00
Zbigniew Jędrzejewski-Szmek
d9b02e1697 tree-wide: drop copyright headers from frequent contributors
Fixes #9320.

for p in Shapovalov Chevalier Rozhkov Sievers Mack Herrmann Schmidt Rudenberg Sahani Landden Andersen Watanabe; do
  git grep -e 'Copyright.*'$p -l|xargs perl -i -0pe 's|/([*][*])?[*]\s+([*#]\s+)?Copyright[^\n]*'$p'[^\n]*\s*[*]([*][*])?/\n*|\n|gms; s|\s+([*#]\s+)?Copyright[^\n]*'$p'[^\n]*\n*|\n|gms'
done
2018-06-20 11:58:53 +02: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
Iwan Timmer
c9299be2f5 resolve: rename PrivateDNS to DNSOverTLS
PrivateDNS is not considered a good name for this option, so rename it to DNSOverTLS
2018-06-14 09:57:56 +02:00
Zbigniew Jędrzejewski-Szmek
23949111c0
Merge pull request #8863 from evelikov/shell-completion-fixes
Shell completion fixes/perf improvements
2018-06-13 14:09:14 +02:00
Yu Watanabe
1a363edad1 bash-completion/resolvectl: support privatedns command 2018-06-13 11:16:26 +09: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
Emil Velikov
9b536b1af2 shell-completion: systemctl: do not list template units in {re,}start
Template units lacking DefaultInstance cannot be enabled/disabled or
started/restarted.

By adding DefaultInstance the unit can be enabled/disabled but it
still cannot be started/restarted.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2018-06-11 17:15:12 +01:00
Emil Velikov
98476dc8b2 shell-completion: systemctl: pass current word to all list_unit*
Earlier patch added the current word to the performance critical paths.
Here we add it to every place, for consistency sake.

Suggested-by: Yu Watanabe (yuwata)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2018-06-11 17:09:58 +01:00
Emil Velikov
8a6236e51a zsh-completion: systemctl: tweak --state list for startable units
This effectively ports over b1bdb6496c
from the bash completion to zsh.

Modulo the new function, since it's unrelated perf. improvement.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2018-06-11 17:09:56 +01:00
Emil Velikov
ff728637cc zsh-completion: systemctl: pass only $PREFIX* to list-unit*
Using a leading * and $SUFFIX produces misleading results. Let's imagine
that one mistypes nect instead of netc, they will get a rather
misleading completion like:  sys-fs-fuse-connections.mount

Not to mention that the execution time is up by ~1/3.
time systemctl list-unit-files netctl* -> ~12ms
time systemctl list-unit-files *netctl* -> ~17ms

Furthermore more units are matched, leading to greater execution time
of `systemctl show' in _filter_units_by_property

Use only $PREFIX*, removing the leading * and trailing $SUFFIX*.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2018-06-11 17:09:56 +01:00
Emil Velikov
c839b729c5 bash-completion: systemctl: pass current partial unit to list-unit*
Pass the partial name of the unit file to list-unit-files and
list-units. This allows for faster completion, since systemctl does
not need to list all the unit files.

For reference:
 - time systemctl list-unit-files -> ~200ms
 - time systemctl list-unit-files netctl* -> ~15ms
 - time systemctl list-units -> ~5ms
 - time systemctl list-units netctl* -> ~5ms

While the list-units time itself is unaffected, now a shorter list is
produced. Thus as we pass it to `systemctl show' (via
__filter_units_by_properties) the execution time will be decreased even
further.

v2: Update list-units hunk in commit message, add quotes around $2*
v3: Remove funky indentation, quote all $cur instances

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2018-06-11 17:09:55 +01:00
Emil Velikov
aedd48160f bash-completion: systemctl: use systemctl --no-pager
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2018-06-11 17:09:53 +01:00
Yu Watanabe
37e21077a3 bash-completion: add completion for portablectl 2018-05-28 18:15:06 +09:00
Yu Watanabe
aea447c9f8 bash-completion: also suggest template unit files
Fixes #9041.
2018-05-28 18:15:00 +09:00
Zbigniew Jędrzejewski-Szmek
dd74faef7a zsh-completion: suggest bus properties instead of configuration items for 'systemctl -p' 2018-05-28 18:14:49 +09:00
Yu Watanabe
4f150c407f bash-completion: suggest bus properties instead of configuration items for 'systemctl -p'
Closes #5137.
2018-05-28 18:13:52 +09:00
Luca Boccassi
49805b3d81 journalctl: add with-unit mode
When dealing with a large number of template instances, for example
when launching daemons per VRF, it is hard for operators to correlate
log lines to arguments.
Add a new with-unit mode which, if available, prefixes unit and user
unit names when displaying its log messages instead of the syslog
identifier. It will also use the full timestamp with timezones, like
the short-full mode.
2018-05-25 14:45:34 +02:00
Lennart Poettering
6f8fa29465
Merge pull request #8981 from keszybz/ratelimit-and-dbus
Ratelimit renaming and dbus error message fix
2018-05-18 21:38:30 +02:00
Yu Watanabe
d231d569d8 bash-completion: add missing options and commands of timedatectl
Follow-up for 6129ec852e.
2018-05-15 10:52:45 +02:00
Zbigniew Jędrzejewski-Szmek
0887b0548b bash-completion: redirect introspection errors to null
If completion is attempted on an invalid path, busctl might respond with an error.
This shouldn't be seen, introspection is supposed to just fail silently.
2018-05-14 08:37:19 +02:00
Yu Watanabe
581ab53740 bash-completion: analyze: support cat-config verb
Follow-up for 854a42fb2e.
2018-05-11 04:11:56 +09:00
Yu Watanabe
7ee19d2643 bash-completion: analyze: add --no-pager for some verbs 2018-05-11 03:33:55 +09:00
Yu Watanabe
bd188ff0ee bash-completion: add completion for resolvectl 2018-04-19 03:26:54 +09:00
Zbigniew Jędrzejewski-Szmek
11a1589223 tree-wide: drop license boilerplate
Files which are installed as-is (any .service and other unit files, .conf
files, .policy files, etc), are left as is. My assumption is that SPDX
identifiers are not yet that well known, so it's better to retain the
extended header to avoid any doubt.

I also kept any copyright lines. We can probably remove them, but it'd nice to
obtain explicit acks from all involved authors before doing that.
2018-04-06 18:58:55 +02:00
Yu Watanabe
7f9c3ecad8 bash-completion: busctl: make variables local 2018-03-30 17:13:52 +09:00
Yu Watanabe
4cbb7c500a bash-completion: busctl: do not suggest "-" for signature
Fixes #8371.
2018-03-30 17:08:14 +09:00
Yu Watanabe
1e58b1dc40 bash-completion: busctl: suggests only writable properties for set-property 2018-03-30 17:06:50 +09:00
Mario Limonciello
e68c79db91 Rename suspend-to-hibernate to suspend-then-hibernate
Per some discussion with Gnome folks, they would prefer this name
as it's more descriptive of what's happening.
2018-03-28 15:11:10 -05:00
Doug Christman
ce21568dc3 zsh-completion: add calendar to systemd-analyze (#8438) 2018-03-13 09:41:07 +01:00
Mario Limonciello
c58493c00a Introduce suspend-to-hibernate (#8274)
Suspend to Hibernate is a new sleep method that invokes suspend
for a predefined period of time before automatically waking up
and hibernating the system.

It's similar to HybridSleep however there isn't a performance
impact on every suspend cycle.

It's intended to use with systems that may have a higher power
drain in their supported suspend states to prevent battery and
data loss over an extended suspend cycle.

Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
2018-03-08 14:17:33 +01:00
Zbigniew Jędrzejewski-Szmek
ecd3717a74 shell-completion: add --global and unit-paths 2018-02-09 12:27:34 +01:00
dana
992f51ea42 Slightly improve performance of startable/restartable unit completion (#7839) 2018-01-28 13:29:58 +01:00
Yu Watanabe
90657286fc analyze: merge {get,set}-log-{level,target} to log-{level,target} (#8020)
Also, service-watchdogs now shows current watchdog state when
no optional argument is provided.
2018-01-27 13:51:32 +01:00
Zbigniew Jędrzejewski-Szmek
dba081db31 zsh: add service-watchdogs
A zsh counterpart to 21a6abdf0e.
2018-01-26 15:24:09 +01:00
Jan Klötzke
21a6abdf0e bash-completion: systemd-analyze: add service-watchdogs verb 2018-01-22 21:39:57 +01:00
Zbigniew Jędrzejewski-Szmek
c557fc3e2f
Merge pull request #7844 from yuwata/bash-completion
update bash completions
2018-01-15 13:51:29 +04:00
Wieland Hoffmann
a6e4952d56 zsh/coredumpctl: Never sort the completion candidates
That way, they're always sorted by date. I do not know how to make ZSH sort
them by PID through some option, but that doesn't seem very useful in the first
place.
2018-01-13 15:23:28 +01:00
Wieland Hoffmann
83701d75fb zsh/coredumpctl: Fix the completion
An output from coredumpctl list is like

> TIME                            PID   UID   GID SIG COREFILE  EXE
> Sun 2016-05-29 18:44:03 CEST  14578  1000  1000   6 none      /tmp/pacaurtmp-wieland/python33/src/Python-3.3.6/python

  ^1  ^2         ^3       ^4    ^5

, but the previous sub() command turns that into

> TIMEPID   UID   GID SIG COREFILE  EXE
> Sun2016-05-29 18:44:03 CEST  14578  1000  1000   6 none      /tmp/pacaurtmp-wieland/python33/src/Python-3.3.6/python
  ^1            ^2       ^3    ^4     ^5

so the whole pipeline generated entries like

$UID:$DESCRIPTION

but that's not useful and probably not what was supposed to happen.

This now generates entries like

$PID:$DESCRIPTION

which make everything work.

Note that with this commmit, the completions will be sorted by PID by
ZSH.
2018-01-13 15:08:36 +01:00
Yu Watanabe
68c7139a4b bash-completion: timedatectl: suggests hostname and machine name 2018-01-10 23:21:26 +09:00
Yu Watanabe
e352389a02 bash-completion: run: add missing options 2018-01-10 23:21:22 +09:00
Yu Watanabe
14aeb7ce7f bash-completion: resolve: add missing options 2018-01-10 23:20:52 +09:00
Yu Watanabe
86b4188d5e bash-completion: nspawn: add missing options 2018-01-10 23:20:45 +09:00
Yu Watanabe
51bcbb6030 bash-completion: detect-virt: add missing option 2018-01-10 23:19:20 +09:00
Yu Watanabe
82ebb6ba1f bash-completion: cgls: suggests units 2018-01-10 23:19:00 +09:00
Yu Watanabe
7c3940f6ce bash-completion: analyze: add missing options and verbs 2018-01-10 23:18:49 +09:00
Yu Watanabe
035dd8c0a3 bash-completion: systemctl: add missing options and verbs 2018-01-10 23:18:16 +09:00
Yu Watanabe
f568dcd101 bash-completion: networkctl: 'list' and 'lldp' can take links 2018-01-10 23:17:41 +09:00
Yu Watanabe
6d92077e39 bash-completion: machinectl: add missing options and verbs 2018-01-10 23:17:32 +09:00
Yu Watanabe
fe56e4ba47 bash-completion: loginctl: add missing options and verbs 2018-01-10 23:16:41 +09:00
Yu Watanabe
f822279e62 bash-completion: localectl: add a missing option and verbs 2018-01-10 23:16:36 +09:00
Yu Watanabe
29e08b9e9e bash-completion: kernel-install: update default path to kernel image 2018-01-10 23:16:29 +09:00
Yu Watanabe
41053e9bdf bash-completion: journalctl add missing options
Also, this deprecates '--this-boot' option.
2018-01-10 23:16:14 +09:00
Yu Watanabe
afcb2246be bash-completion: hostnamectl: add a missing option 2018-01-10 23:15:45 +09:00
Yu Watanabe
245c1e6802 bash-completion: coredumpctl: support more options 2018-01-10 23:15:21 +09:00
Yu Watanabe
cdb8ec2d37 bash-completion: busctl: support more options and verbs 2018-01-10 23:11:00 +09:00
Yu Watanabe
92360836a0 bash-completion: bootctl: support more options and verbs 2018-01-10 23:10:19 +09:00
Zbigniew Jędrzejewski-Szmek
3a726fcd08 Add license headers and SPDX identifiers to meson.build files
So far I avoided adding license headers to meson files, but they are pretty
big and important and should carry license headers like everything else.
I added my own copyright, even though other people modified those files too.
But this is mostly symbolic, so I hope that's OK.
2017-11-19 19:08:15 +01:00
Zbigniew Jędrzejewski-Szmek
7059062c2f Add SPDX license headers to shell completion scripts 2017-11-19 19:08:15 +01:00
Lubomir Rintel
4e93d369b9 systemctl: clarify --global, --root and --runtime options (#7071)
They're not only for enabling.
2017-10-12 08:14:25 +02:00
g0tar
91277dff73 pass currently completed word to systemctl list-unit-files/list-units (#6927)
This change noticeably increases completion performance at the expense
of preventing possible _correct, _approximate or any matcher-list rules.
Still, responsiveness increase so huge seems to make it worth the price.
2017-10-05 22:17:51 +02:00
Zbigniew Jędrzejewski-Szmek
1ec57f3394 build-sys: s/ENABLE_RESOLVED/ENABLE_RESOLVE/
The configuration option was called -Dresolve, but the internal define
was …RESOLVED. This options governs more than just resolved itself, so
let's settle on the version without "d".
2017-10-04 12:09:51 +02:00
Zbigniew Jędrzejewski-Szmek
349cc4a507 build-sys: use #if Y instead of #ifdef Y everywhere
The advantage is that is the name is mispellt, cpp will warn us.

$ git grep -Ee "conf.set\('(HAVE|ENABLE)_" -l|xargs sed -r -i "s/conf.set\('(HAVE|ENABLE)_/conf.set10('\1_/"
$ git grep -Ee '#ifn?def (HAVE|ENABLE)' -l|xargs sed -r -i 's/#ifdef (HAVE|ENABLE)/#if \1/; s/#ifndef (HAVE|ENABLE)/#if ! \1/;'
$ git grep -Ee 'if.*defined\(HAVE' -l|xargs sed -i -r 's/defined\((HAVE_[A-Z0-9_]*)\)/\1/g'
$ git grep -Ee 'if.*defined\(ENABLE' -l|xargs sed -i -r 's/defined\((ENABLE_[A-Z0-9_]*)\)/\1/g'
+ manual changes to meson.build

squash! build-sys: use #if Y instead of #ifdef Y everywhere

v2:
- fix incorrect setting of HAVE_LIBIDN2
2017-10-04 12:09:29 +02:00
Lucas Werkmeister
ef5a8cb1a7 analyze: add get-log-level, get-log-target verbs
They’re counterparts to the existing set-log-level and set-log-target
verbs, simply printing the current value to stdout. This makes it
slightly easier to temporarily change the log level and/or target and
then restore the old value(s).
2017-09-07 23:55:59 +02:00
Lucas Werkmeister
4146ac2a4c shell-completion: add systemd-analyze set-log-target
The `systemd-analyze set-log-target` command was added in v227 (commit
2ca2a91cf1), but was missing from the shell completion specifications.
2017-09-07 23:47:33 +02:00
Martin Pitt
9fcaa574f0 Merge pull request #6465 from keszybz/drop-kdbus
Drop kdbus-dependent code
2017-07-28 09:29:07 +02:00
Yu Watanabe
6bda23dd6a bash-completion: use the first argument instead of the global variable (#6457)
Without this fix:

$ systemctl start <tab>
Display all 135 possibilities? (y or n)
$ __get_startable_units --system | wc -l
224

the number of the suggestions are quite different, as __get_startable_units --system does
not filter already started units. With this fix,

$ systemctl start <tab>
Display all 135 possibilities? (y or n)
$ __get_startable_units --system | wc -l
123
$ __get_template_names --system | wc -l
12

the number of the suggestions matches one the function returns.
For consistency with the other internal functions, it should use the first argument
instead of the global variable $mode.

[zj: add commit message to make it sound like we know what we're doing]
2017-07-27 07:22:54 -04:00
Zbigniew Jędrzejewski-Szmek
4bc5d27b94 Drop busname unit type
Since busname units are only useful with kdbus, they weren't actively
used. This was dead code, only compile-tested. If busname units are
ever added back, it'll be cleaner to start from scratch (possibly reverting
parts of this patch).
2017-07-23 09:29:02 -04:00
Zbigniew Jędrzejewski-Szmek
e5f752082e build-sys: drop gitignore patterns for in-tree builds
... and other autotools-generated files.
2017-07-18 10:05:06 -04:00
Zbigniew Jędrzejewski-Szmek
72cdb3e783 build-sys: drop automake support
v2:
- also mention m4
2017-07-18 10:04:44 -04:00
Zbigniew Jędrzejewski-Szmek
a5be8dabd6 Add networkctl label to man and shell completion 2017-06-27 10:30:41 -04:00
Felipe Sateler
d739ce98f3 zsh: add completion for add-wants and add-requires (#6082) 2017-06-06 21:32:15 -04:00
Lucas Werkmeister
0f8158bd26 shell-completion: add systemctl revert (#6042)
The `systemctl revert` command was added in v230 (commit 344ca7556b),
but was missing from the shell completion specifications.

Fixes #5978.
2017-05-29 15:01:01 +02:00
Ian Wienand
7e563bfc97 Add short-iso-precise for journalctl output (#5884)
This adds a short-iso-precise option for journalctl output.  It is similar to
short-iso, but includes microseconds.
2017-05-07 20:23:49 -04:00
Zbigniew Jędrzejewski-Szmek
2c201c2140 meson: use booleans for conf.set and drop unecessary conditionals
Using conf.set() with a boolean argument does the right thing:
either #ifdef or #undef. This means that conf.set can be used unconditionally.

Previously I used '1' as the placeholder value, and that needs to be changed to
'true' for consistency (under meson 1 cannot be used in boolean context). All
checks need to be adjusted.
2017-05-02 16:29:11 -04:00
Zbigniew Jędrzejewski-Szmek
37efbbd821 meson: reindent all files with 8 spaces
The indentation for emacs'es meson-mode is added .dir-locals.

All files are reindented automatically, using the lasest meson-mode from git.
Indentation should now be fairly consistent.
2017-04-23 21:47:29 -04:00
Michael Biebl
e17e5ba9bf meson: use join_paths consistently
With -Dsplit-usr=true, we set rootprefix to /. This leads to //lib/systemd or
//lib/udev for various dir variables. Using join_paths() avoids this.
2017-04-23 21:47:28 -04:00
Zbigniew Jędrzejewski-Szmek
5c23128dab meson: build systemd using meson
It's crucial that we can build systemd using VS2010!

... er, wait, no, that's not the official reason. We need to shed old systems
by requring python 3! Oh, no, it's something else. Maybe we need to throw out
345 years of knowlege accumulated in autotools? Whatever, this new thing is
cool and shiny, let's use it.

This is not complete, I'm throwing it out here for your amusement and critique.

- rules for sd-boot are missing. Those might be quite complicated.

- rules for tests are missing too. Those are probably quite simple and
  repetitive, but there's lots of them.

- it's likely that I didn't get all the conditions right, I only tested "full"
  compilation where most deps are provided and nothing is disabled.

- busname.target and all .busname units are skipped on purpose.

  Otherwise, installation into $DESTDIR has the same list of files and the
  autoconf install, except for .la files.

It'd be great if people had a careful look at all the library linking options.
I added stuff until things compiled, and in the end there's much less linking
then in the old system. But it seems that there's still a lot of unnecessary
deps.

meson has a `shared_module` statement, which sounds like something appropriate
for our nss and pam modules. Unfortunately, I couldn't get it to work. For the
nss modules, we need an .so version of '2', but `shared_module` disallows the
version argument. For the pam module, it also didn't work, I forgot the reason.

The handling of .m4 and .in and .m4.in files is rather awkward. It's likely
that this could be simplified. If make support is ever dropped, I think it'd
make sense to switch to a different templating system so that two different
languages and not required, which would make everything simpler yet.

v2:
- use get_pkgconfig_variable
- use sh not bash
- use add_project_arguments

v3:
- drop required:true and fix progs/prog typo

v4:
- use find_library('bz2')
- add TTY_GID definition
- define __SANE_USERSPACE_TYPES__
- use join_paths(prefix, ...) is used on all paths to make them all absolute

v5:
- replace all declare_dependency's with []
- add more conf.get guards around optional components

v6:
- drop -pipe, -Wall which are the default in meson
- use compiler.has_function() and compiler.has_header_symbol instead of the
  hand-rolled checks.
- fix duplication in 'liblibsystemd' library name
- use the right .sym file for pam_systemd
- rename 'compiler' to 'cc': shorter, and more idiomatic.

v7:
- use ENABLE_ENVIRONMENT_D not HAVE_ENVIRONMENT_D
- rename prefix to prefixdir, rootprefix to rootprefixdir
  ("prefix" is too common of a name and too easy to overwrite by mistake)
- wrap more stuff with conf.get('ENABLE...') == 1
- use rootprefix=='/' and rootbindir as install_dir, to fix paths under
  split-usr==true.

v8:
- use .split() also for src/coredump. Now everything is consistent ;)
- add rootlibdir option and use it on the libraries that require it

v9:
- indentation

v10:
- fix check for qrencode and libaudit

v11:
- unify handling of executable paths, provide options for all progs

  This makes the meson build behave slightly differently than the
  autoconf-based one, because we always first try to find the executable in the
  filesystem, and fall back to the default. I think different handling of
  loadkeys, setfont, and telinit was just a historical accident.

  In addition to checking in $PATH, also check /usr/sbin/, /sbin for programs.
  In Fedora $PATH includes /usr/sbin, (and /sbin is is a symlink to /usr/sbin),
  but in Debian, those directories are not included in the path.

  C.f. https://github.com/mesonbuild/meson/issues/1576.

- call all the options 'xxx-path' for clarity.
- sort man/rules/meson.build properly so it's stable
2017-04-23 21:47:26 -04:00
David Herrmann
34b52450c5 hostname: add 'convertible' chassis type
Add the 'convertible' type to the set of allowed chassis. This applies
to all devices that can be transformed by the user from laptop style to
tablet style.

This does not add any auto-detection, yet. It only makes 'set-chassis'
accept 'convertible' as valid input.
2017-02-28 11:54:52 +01:00
Giedrius Statkevičius
15710d4479 shell-completion: include the new coredumpctl options 2017-02-24 21:30:59 +02:00
Namhyung Kim
5badf05f39 shell_completion: Add -r option for coredumpctl 2017-02-14 23:27:16 +09:00
Zbigniew Jędrzejewski-Szmek
bef19548a2 systemctl: restore --failed (#5198)
'systemctl --failed' is an extremely common operation and it's nice to have
a shortcut for it.

Revert "man: don't document systemctl --failed" and add the option back to
systemctl's help and shell completion scripts.

This reverts commit 036359ba8d.
2017-02-02 00:23:46 +01:00
llua
644317741a zsh-completion: _journalctl fixes (#5165)
allow _journalctl to work when the rcquotes option is set, broken in ba89f80620.
allow the completion of --file multiple times, which ba89f80620 claims is true.

Fixes #4842
2017-01-27 09:50:40 -03:00
Jan Synacek
0067c7b29a bash-completion: add support for --now (#5155) 2017-01-25 07:44:04 -05:00
Александр Тихонов
88e4dbd505 Fixi caching in zsh completion (#5122)
I found several issues with zsh completion code:

1. typo in cache filename: "SYS_ALL_PROPRTIES", so cache just not loading from this file
2. cache stored in one file, despite user or system mode. So it can be loaded later in wrong mode
3. most serious problem: broken logic - it retrieves cache when _cache_invalid is true

How to reproduce: type "systemctl --user status <TAB>" and you will see user units. Then press 
control+C and type "systemctl --system status <TAB>" in same session and you'll see user units again
2017-01-21 14:53:09 -05:00
Namhyung Kim
28b6b5de3f bash_completion: journalctl: Complete -t option values
The -t or --identifier requires a syslog identifier.
2017-01-21 16:38:23 +09:00
Namhyung Kim
ed52c971bf bash_completion: journalctl: add missing options
The --no-hostname and --vacuum-files were missing, add them.
2017-01-21 16:38:04 +09:00
Zbigniew Jędrzejewski-Szmek
99171d2fdf shell-completion: redirect all errors from systemctl to /dev/null
Completion scripts should not generate errors, ever.

https://bugzilla.redhat.com/show_bug.cgi?id=1409649
2017-01-11 16:37:34 -05:00
Doug Christman
07d6181589 zsh-completion: fix typo and rephrase option hints (#4963) 2016-12-23 14:37:28 +01:00
Zbigniew Jędrzejewski-Szmek
869feb3388 analyze: add syscall-filter verb
This should make it easier for users to understand what each filter
means as the list of syscalls is updated in subsequent systemd versions.
2016-11-03 09:35:35 -04:00
llua
6c9414a700 zsh-completion: fix for #4318 (#4394)
Escape unit names for the eval call in _call_program

The value of the Id property is transformed back into a unit name
usable by systemctl.
system-systemd\x5cx2dcryptsetup.slice -> system-systemd\x2dcryptsetup.slice

Also filter units by property via parameter expansion, not a for loop
2016-10-17 14:35:26 +02:00
Lennart Poettering
40f45ff0c3 Merge pull request #4115 from yuwata/completion-fix
bash-completion: systemctl: do not pass masked or not-found units to filter
2016-10-11 17:05:19 +02:00
Davide Cavalca
c0f9116d6c shell-completion: add --wait to systemd-run completions (#4140) 2016-09-14 22:38:53 +02:00
Yu Watanabe
c07c80bc96 bash-completion: systemctl: use local variables 2016-09-14 15:22:45 +09:00
Yu Watanabe
b1bdb6496c bash-completion: systemctl: do not pass masked or not-found units to filter
Also, add new function __filter_units_by_properties() for filtering units by
multiple properties, and make __get_startable_units() use it.

fixes #4114
2016-09-09 16:20:05 +09:00
Marcos Mello
0cea2697ed shell-completion: add systemd-resolve --status (#4085)
From be371fe.
2016-09-02 12:18:11 +02:00
Daniel Hahler
b2fe35fe58 zsh: _journalctl: also handle --root arg and --key=value style (#3956)
This will now also handle `journalctl --directory=/var/log/journal`
properly.
2016-08-16 12:47:39 -04:00
Daniel Hahler
ba89f80620 zsh: _journalctl: do not complete exclusive modes (#3957)
After `journalctl -D /var/log/journal` "--directory", "--file",
"--machine" and "--root" should not be available for completion, because
they are exclusive.  But multiple `--file` arguments are allowed.
2016-08-16 12:42:41 -04:00
Daniel Hahler
e09d0d46c2 zsh: _systemctl: do not attempt to use "--system" by default (#3951)
In 68c4f6d the following was added:

    local -a _modes; _modes=("--user" "--system")
    local _sys_service_mgr=${${words:*_modes}[(R)(${(j.|.)_modes})]:---system}

With the following comment:

> If neither are on the line, --system is set; for system services to be
> completed.

But it does not work as documented:

    % _modes=(--user --system)
    % words=()
    % echo ${${words:*_modes}[(R)(${(j.|.)_modes})]:---system}

However, it should not use `--system` in that case anyway, so this patch
removes the part that should cause a default to be used and adds some
comments.
2016-08-13 10:42:55 -04:00
Daniel Hahler
d551b8fcf7 zsh: _journalctl: improve support for handling mode args (#3952)
This only completes fields from `journalctl --user` in _journal_fields when `--user`
is used.

It also changes $_sys_service_mgr to include both `--system` and `--user`,
because `journalctl` behaves different from `systemctl` in this regard.
No attempt is made to filter out invalid combinations, e.g. when using both
`--directory` and `--system` (see https://github.com/systemd/systemd/issues/3949).
2016-08-13 10:41:22 -04:00
Daniel Hahler
21d84318c3 zsh: _journalctl: handle --user in _journal_none
This uses the same mechanism from _systemctl to inject `--user` into the
`journalctrl -F _EXE` call to list executables.
Before this patch the "commands" section would list executables from
system units always.
2016-08-11 18:52:13 +02:00
Daniel Hahler
56ef545c24 zsh: _filter_units_by_property: respect --user
Use `$_sys_service_mgr` to handle `--user`, so that `systemctl --user
stop` will correctly filter the active (user) units.  Before this patch,
only user units that also exist as system units and are stoppable there
would be listed.
2016-08-11 18:46:31 +02:00
Lennart Poettering
29a753df76 journalctl: add new output mode "short-full" (#3880)
This new output mode formats all timestamps using the usual format_timestamp()
call we use pretty much everywhere else. Timestamps formatted this way are some
ways more useful than traditional syslog timestamps as they include weekday,
month and timezone information, while not being much longer. They are also not
locale-dependent. The primary advantage however is that they may be passed
directly to journalctl's --since= and --until= switches as soon as #3869 is
merged.

While we are at it, let's also add "short-unix" to shell completion.
2016-08-03 19:45:07 -04:00
Alessandro Puccetti
2a624c36e6 doc,core: Read{Write,Only}Paths= and InaccessiblePaths=
This patch renames Read{Write,Only}Directories= and InaccessibleDirectories=
to Read{Write,Only}Paths= and InaccessiblePaths=, previous names are kept
as aliases but they are not advertised in the documentation.

Renamed variables:
`read_write_dirs` --> `read_write_paths`
`read_only_dirs` --> `read_only_paths`
`inaccessible_dirs` --> `inaccessible_paths`
2016-07-19 17:22:02 +02:00
ntzrmtthihu777
b010a6a1ae zsh-completion: fix option ordering in set-x11-keymap (#3646) 2016-07-15 04:59:45 -04:00
Alessandro Puccetti
14ca5c9cb4 nspawn-completion: implementation of shell completion of --notify-ready (#3679)
Relative to: https://github.com/systemd/systemd/pull/3474
2016-07-08 17:44:20 +02:00
Christian Rebischke
b2bb19bbda machinectl: Added stop as alias for poweroff (#3406) 2016-06-06 17:06:20 +02:00
Lennart Poettering
67044a24c3 bash: use the actual journal fields used in the journal files for completion 2016-05-30 19:35:24 +02:00
Zbigniew Jędrzejewski-Szmek
ed1190498f tree-wide: remove uses of --failed
It has been replaced by --state=failed.
2016-05-08 20:27:33 -04:00
Felipe Sateler
673fca32be zsh-completion: remove non-portable uses of \s in awk (#3063) 2016-04-19 00:23:01 -04:00
Felipe Sateler
c54318c66f Add zsh completion for networkctl (#3062) 2016-04-18 23:27:42 +02:00
Evgeny Vereshchagin
6d94d993c7 bash completion: add --template to nspawn 2016-03-20 17:55:58 +00:00
Zbigniew Jędrzejewski-Szmek
e81eb2874e systemd-resolve: initial shell completion
v2:
- use /sys/class/net to list interfaces,
  also copy the same code to systemd-nspawn
v3:
- do not propose "any" twice for --type
2016-02-18 11:50:53 -05:00
Daniel Mack
50f48ad37a cgroup: remove support for NetClass= directive
Support for net_cls.class_id through the NetClass= configuration directive
has been added in v227 in preparation for a per-unit packet filter mechanism.
However, it turns out the kernel people have decided to deprecate the net_cls
and net_prio controllers in v2. Tejun provides a comprehensive justification
for this in his commit, which has landed during the merge window for kernel
v4.5:

  https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=bd1060a1d671

As we're aiming for full support for the v2 cgroup hierarchy, we can no
longer support this feature. Userspace tool such as nftables are moving over
to setting rules that are specific to the full cgroup path of a task, which
obsoletes these controllers anyway.

This commit removes support for tweaking details in the net_cls controller,
but keeps the NetClass= directive around for legacy compatibility reasons.
2016-02-10 16:38:56 +01:00
Dan Walsh
2720e0c0f0 Journalctl command completion should show machines 2016-02-08 07:22:34 -05:00
Zbigniew Jędrzejewski-Szmek
8cd095cc27 shell-completion: fix header 2016-02-06 17:54:48 -05:00
Lennart Poettering
aabf5d4243 systemctl: rename "reload-or-try-restart" verb to "try-reload-or-restart"
But also keep the old name as (undocumented) compatibility around.

The reload-or-try-restart was documented to be a NOP if the unit is not running, since the previous commits this is
also implemented. The old name suggests that the "try" logic only applies to restarting. Fix this, by moving the "try-"
to the front, to indicate that the whole option is a NOP if the service isn't running.
2016-01-28 18:57:04 +01:00
Douglas Christman
655fd9d71f zsh-completion: Escape results for journalctl --unit
Escape colons and backslashes in unit names.
This gives correct completions for units with names like
    systemd-backlight@backlight:acpi_video0.service
and
    systemd-fsck@dev-disk-by\x2duuid-...
2016-01-25 18:10:31 -05:00
Lennart Poettering
b43d75c378 importd: drop dkr support
The current code is not compatible with current dkr protocols anyway,
and dkr has a different focus ("microservices") than nspawn anyway
("whole machine containers"), hence drop support for it, we cannot
reasonably keep this up to date, and it creates the impression we'd
actually care for the microservices usecase.
2015-12-10 16:54:41 +01:00
Evgeny Vereshchagin
c2af810150 bash-completion: list valid signal names
this is a follow-up for commit 18540892d1
2015-11-24 16:05:42 +00:00
Zbigniew Jędrzejewski-Szmek
18540892d1 bash-completion: list only valid signal names
Fixup for #1999.
2015-11-24 09:39:49 -05:00
Evgeny Vereshchagin
d5d841ff9d bash-completion: nspawn: add completion for --kill-signal 2015-11-23 17:01:26 +00:00
Marcos Mello
1a51b1b1c2 shell-completion: journalctl: add --sync
From 94b6551
2015-11-15 14:04:15 -02:00
Filipe Brandenburger
b4c14404b3 execute: Add new PassEnvironment= directive
This directive allows passing environment variables from the system
manager to spawned services. Variables in the system manager can be set
inside a container by passing `--set-env=...` options to systemd-spawn.

Tested with an on-disk test.service unit. Tested using multiple variable
names on a single line, with an empty setting to clear the current list
of variables, with non-existing variables.

Tested using `systemd-run -p PassEnvironment=VARNAME` to confirm it
works with transient units.

Confirmed that `systemctl show` will display the PassEnvironment
settings.

Checked that man pages are generated correctly.

No regressions in `make check`.
2015-11-11 07:55:23 -08:00
Marcos Mello
23c35c82c4 shell-completion: journalctl: add -S and -U options
Added by 66f5292
2015-11-11 08:29:46 -02:00
Zbigniew Jędrzejewski-Szmek
36b4a7ba55 Remove snapshot unit type
Snapshots were never useful or used for anything. Many systemd
developers that I spoke to at systemd.conf2015, didn't even know they
existed, so it is fairly safe to assume that this type can be deleted
without harm.

The fundamental problem with snapshots is that the state of the system
is dynamic, devices come and go, users log in and out, timers fire...
and restoring all units to some state from the past would "undo"
those changes, which isn't really possible.

Tested by creating a snapshot, running the new binary, and checking
that the transition did not cause errors, and the snapshot is gone,
and snapshots cannot be created anymore.

New systemctl says:
Unknown operation snapshot.
Old systemctl says:
Failed to create snapshot: Support for snapshots has been removed.

IgnoreOnSnaphost settings are warned about and ignored:
Support for option IgnoreOnSnapshot= has been removed and it is ignored

http://lists.freedesktop.org/archives/systemd-devel/2015-November/034872.html
2015-11-10 19:33:06 -05:00
Lennart Poettering
51c41a97ec Merge pull request #1775 from fbuihuu/set-property-completion
bash-completion: add minimal support fpr 'set-property' command
2015-11-04 17:52:50 +01:00
Franck Bui
d82fabdb7f bash-completion: add minimal support fpr 'set-property' command
'set-property' was missing from the list of known command.

Also a list of unit names will be proposed as next argument.

However no support on property names is provided since it would
require a hard coded list of them.
2015-11-04 08:42:16 +01:00
Lennart Poettering
5732a7dbb0 Merge pull request #1690 from evverx/run-runtime-directory
systemd-run can launch units with RuntimeDirectory
2015-11-02 20:16:18 +01:00
Evgeny Vereshchagin
93557fcb5d shell-completion: systemctl: show completions for user in global mode 2015-10-30 04:55:32 +03:00
Evgeny Vereshchagin
1012972478 shell-completion: hostnamectl: add the command set-location 2015-10-29 07:47:16 +03:00
Evgeny Vereshchagin
dcebcd7ade shell-completion: systemd-run: add the property RuntimeDirectory 2015-10-27 05:18:12 +03:00
Evgeny Vereshchagin
64fa5643df shell-completion: systemd-run: add the property ProtectHome 2015-10-26 00:22:34 +00:00
Zbigniew Jędrzejewski-Szmek
5ef80f3bbb zsh-completion: journalctl --identifier
Fixes #1549.
2015-10-25 10:49:19 -04:00
Evgeny Vereshchagin
4e79ac4425 shell-completion: systemd-run: add the property ProtectSystem 2015-10-24 22:49:46 +00:00
Nicolas Cornu
7e7cd2526d shell-completion: systemd-run: add new property EnvironmentFile 2015-10-21 16:18:59 +02:00
Nicolas Cornu
5ffd7671cc Add zsh completion on systemd-run's properties 2015-10-21 15:51:09 +02:00
Evgeny Vereshchagin
64a713d94d shell-completion: systemd-run: add new properties
"ReadWriteDirectories", "ReadOnlyDirectories", "InaccessibleDirectories"
2015-10-20 22:03:49 +00:00
Evgeny Vereshchagin
e9cc999a30 shell-completion: systemd-run: add property OOMScoreAdjust 2015-10-17 20:03:40 +00:00
Evgeny Vereshchagin
8d2bc8e5fd shell-completion: systemd-run: add TimerSlackNSec property 2015-10-15 10:01:09 +00:00
Evgeny Vereshchagin
75d73dc9d0 shell-completion: systemd-run: add SyslogFacility property 2015-10-14 15:05:14 +00:00
Evgeny Vereshchagin
7135129e0a shell-completion: systemd-run: add SyslogLevel property 2015-10-14 14:48:55 +00:00
Lennart Poettering
b3ccac01cc zsh: don't mention /etc/mtab
The file is obsolete, use /proc/self/mounts instead.

Also, yuck, the code is so awful...
2015-10-09 17:20:32 +02:00
Evgeny Vereshchagin
dc800d8406 shell-completion: systemd-run: add new properties 2015-10-09 12:42:34 +00:00
Evgeny Vereshchagin
f961371fb7 shell-completion: systemd-run: add new properties
See:
* 602b83559a
* b9c50073fc
2015-10-09 06:49:46 +03:00
Lennart Poettering
1af1f2f92e shell-completion: add pseudo machine ".host" to shell completion 2015-10-08 15:14:27 +02:00
Lennart Poettering
56f3cb335a shell-completion: add "machinectl shell" to bash completion logic 2015-10-08 15:03:31 +02:00
Lennart Poettering
23a749f285 Merge pull request #1419 from keszybz/shell-completion
Shell completion tweaks
2015-09-30 22:32:09 +02:00
Evgeny Vereshchagin
0c66ffd8b9 shell-completion: journalctl: add --rotate 2015-09-30 22:58:05 +03:00
Zbigniew Jędrzejewski-Szmek
4ed2f1b1f1 bash-completion: remove one more sort and sub-shell
{} is preferred to (), because the first is just grouping, while the
second invokes a separate shell.
2015-09-28 17:23:53 -04:00