Otherwise, at this stage, the interface may be in e.g. initialized or
pending state, and the drop-in file introduced by the previous command
may not be registered to the state file for the interface.
Fixes#32685.
Previously, even if a DNS server is in the acquired prefix, the route to the
server might have gateway address.
This makes the prefix route, which is always configured, is also handled
as same as static routes, and do not use any gateway if the prefix route
is the most suitable route to access the destination.
The same change is also applied to route to NTP servers and semi-static
routes.
Fixes a regression introduced by 0ce86f5eeb.
Fixes#32715.
Fixes a regression introduced by e44f06065b.
After the offending commit, if a boot ID suffixed with an offset is
specified to --boot=, the boot ID was ignored.
This fixes the issue.
To fix the issue, this merges journal_find_boot_by_id() and
journal_find_boot_by_offset().
Otherwise, if several matches already set, then the first seek to head
or tail may move the cursor to an invalid place, hence they provide
wrong ID(s). Also, reading journal after calling these function may
provide unexpected data.
Currently, the caller does not install any matches before calling the
functions, and does not read any journal entry after journal_get_boots()
succeeds or journal_find_boot_by_offset() succeeds with 0. Hence, this
should not change any behavior. Just for safety.
- rename to parse_id_descriptor(), to make it usable for other kind of
ID later.
- add missing assertions,
- prefix arguments for storing results with 'ret_',
- drop unnecessary 'else'.
_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 -"
Follow-up for f380473edf
This cleans up the code a bit. Also, before this commit,
if MemoryAvailable is set but show_memory_available
is false, and we have nothing else to output, empty
parenthesis is shown. This can be easily reproduced
on -.slice:
> systemctl status -- -.slice
> ...
> Memory: 1.8G ()
> ...
Like much English text, the systemd documentation uses "may not" in the
sense of both "will possibly not" and "is forbidden to". In many cases
this is OK because the context makes it clear, but in others I felt it
was possible to read the "is forbidden to" sense by mistake: in
particular, I tripped over "the target file may not exist" in
systemd.unit(5) before realizing the correct interpretation.
Use "might not" or "may choose not to" in these cases to make it clear
which sense we mean.