| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
Bash completion: no more ANSI colorcode in pathnames
|
| |
|
| |
|
|
|
|
|
|
| |
The verb works only on running service units, so complete on that as the first
parameter, and a local file as the second. The other parameters are inside the
service namespace so we can't autocomplete from the outside, return early.
|
| |
|
|
|
|
| |
Resolves: #29048
|
| |
|
|
|
|
|
|
|
|
|
|
| |
As previously announced, execute order 66:
https://lists.freedesktop.org/archives/systemd-devel/2022-September/048352.html
The meson options split-usr, rootlibdir and rootprefix become no-ops
that print a warning if they are set to anything other than the
default values. We can remove them in a future release.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a few unrelated issues:
- when ENABLE_MACHINED is false, machinectl is not installed, but _sd_machines
is still used in a few places that want to complete -M and such.
Also, bash completion calls machinectl in various places.
Make missing machinectl mean "no machines" in this case, so
that no error is generated in the callers.
- machinectl list --full would print multiple lines of output per machine,
breaking grep, issue introduced in e2268fa43742ece4a5cdc2e93f731b2bb2fcc883.
Using --max-addresses=1 would fix the issue, but let's use
--max-addresses=0 because we now can.
- the lists used in various places were slightly different for no good reason.
- don't use a subshell if not necessary.
The code for bash still uses the same combined list of images and running
machines for various commands. The zsh code uses images for start/clone, and
running machines for the rest. Maybe something to fix in the future.
Replaces #25048.
|
|
|
|
|
|
|
|
|
|
|
| |
getopt allows non-ambiguous abbreviations, so backwards-compat is maintained, and
people can use --kill-who (or even shorter abbreviations). English is flexible,
so in common speach people would use both forms, even if "whom" is technically
more correct. The advantage of using the longer form in the code is that we
effectively allow both forms, so we stop punishing people who DTGCT¹, but still
allow people to use the spoken form if they prefer.
1. Do the gramatically correct thing
|
| |
|
|
|
|
| |
Fixes https://github.com/systemd/systemd/issues/19987
|
| |
|
|
|
|
|
|
| |
I don't think it makes sense to complete --legend=yes. It is the default, and
it would be only used very rarely (and then it is easy enough to just remove
the '=no' part from the suggested string).
|
|
|
|
|
| |
Use the new DBUS method and follow the same pattern as the
systemctl bind command.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
The same as in other places, indentation levels were all over the place.
|
|
|
|
| |
Closes #11942.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
This also unifies __filter_units_by_property() and
__filter_units_by_properties(), and makes completion for 'restart',
'reload' or 'stop' show more candidates.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
|
|
|
|
| |
Fixes #9041.
|
|
|
|
|
|
| |
'systemctl -p'
Closes #5137.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Per some discussion with Gnome folks, they would prefer this name
as it's more descriptive of what's happening.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]
|
|
|
|
|
|
| |
The `systemctl revert` command was added in v230 (commit 344ca7556b),
but was missing from the shell completion specifications.
Fixes #5978.
|