1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 02:21:44 +03:00
Commit Graph

6300 Commits

Author SHA1 Message Date
Lennart Poettering
2f166bb79b man: document _outbound 2021-04-23 12:02:24 +02:00
Flos Lonicerae
c44a285c41
Add D-Bus property exposing Ctrl-Alt-Delete action (#19217) 2021-04-23 09:57:14 +02:00
Lennart Poettering
60c6c2101c man: --add was renamed --copy-to when it was merged, fix man page reference to it 2021-04-21 22:24:38 +02:00
Lennart Poettering
6f4a5f25fc
Merge pull request #19271 from yuwata/dhcp-duid-uuid
network: fix issues arround DHCP DUID-UUID
2021-04-21 21:59:35 +02:00
Lennart Poettering
e19479aa7d
Merge pull request #19365 from keszybz/sd_id128_equals
Add sd_id128_in_set()
2021-04-21 21:45:14 +02:00
Zbigniew Jędrzejewski-Szmek
64b21afc72 sd-id128: add convenience functions to compare multiple sd_id128_t
Similar to sd_bus_error_has_names() that was added in
2b07ec316a.

It is made inline in the hope that the compiler will be able to optimize
all the va_args boilerplate away, and do an efficient comparison when
the arguments are all constants.
2021-04-21 17:51:24 +02:00
Yu Watanabe
4e26a5baa0 network: make IAID and DUID for DHCPv6 configurable explicitly
Closes #18996.
2021-04-21 21:00:11 +09:00
Yu Watanabe
b67bbfef14
Merge pull request #19344 from yuwata/network-route-metric-19028
network: add RouteMetric= setting in [Address] and more
2021-04-21 20:51:31 +09:00
Yu Watanabe
ea846e45c1 doc: fix typo 2021-04-21 09:57:30 +02:00
Zbigniew Jędrzejewski-Szmek
78aa5b6f59 man: mention sd_id128_is_allf(), SD_ID128_ALLF
It was added in 670814387b, but not
mentioned in the man pages.
2021-04-21 08:45:05 +02:00
Zbigniew Jędrzejewski-Szmek
e0a41aa4c6 man: dedent examples in sd-id128 to 2 columns
In man pages, horizontal space it at premium, and everything should
generally be indented with 2 spaces to make it more likely that the
examples fit on a user's screen.

C.f. 798d3a524e.
2021-04-21 08:45:05 +02:00
Yu Watanabe
4c0aae015f man: update explanation about route metric 2021-04-21 13:55:02 +09:00
Yu Watanabe
0e1fb1d09a network: radv: add RouteMetric= setting in [IPv6Prefix] 2021-04-21 13:55:02 +09:00
Yu Watanabe
9fe0b7b493 network: dhcp6-pd: add RouteMetric= setting in [DHCPv6PrefixDelegation] 2021-04-21 13:55:02 +09:00
Yu Watanabe
8ebafba9f9 network: move RouteMetric= from [DHCPv6] to [IPv6AcceptRA]
As the value is used in the routes in RA.
2021-04-21 13:55:02 +09:00
Yu Watanabe
c4ff0629dd network: add RouteMetric= setting in [Address] section 2021-04-21 13:54:59 +09:00
Lennart Poettering
3464514457 man: document new initrd-usr-fs.target 2021-04-20 19:11:07 +02:00
Yegor Alexeyev
c95df5879e relay role implementation 2021-04-20 15:11:53 +02:00
Yu Watanabe
d5bfddf037 man: fix typo
Follow-up for e73309c532.
2021-04-20 11:41:05 +01:00
Lennart Poettering
fd2f6f7248
Merge pull request #19096 from poettering/repart-features
repart: four new features: CopyBlocks=auto + --image= + ReadOnly=/Flags= + MakeDirectories=
2021-04-20 10:20:22 +02:00
Lennart Poettering
e73309c532 repart: add new ReadOnly= and Flags= settings for repart dropins
Let's make the GPT partition flags configurable when creating new
partitions. This is primarily useful for the read-only flag (which we
want to set for verity enabled partitions).

This adds two settings for this: Flags= and ReadOnly=, which strictly
speaking are redundant. The main reason to have both is that usually the
ReadOnly= setting is the one wants to control, and it' more generic.
Moreover we might later on introduce inherting of flags from CopyBlocks=
partitions, where one might want to control most flags as is except for
the RO flag and similar, hence let's keep them separate.
2021-04-19 23:16:02 +02:00
Lennart Poettering
5c08da586f repart: add CopyBlocks=auto support
When using systemd-repart as an installer that replicates the install
medium on another medium it is useful to reference the root
partition/usr partition or verity data that is currently booted, in
particular in A/B scenarios where we have two copies and want to
reference the one we currently use. Let's add a CopyBlocks=auto for this
case: for a partition that uses that we'll copy a suitable partition
from the host.

CopyBlocks=auto finds the partition to copy like this: based on the
configured partition type uuid we determine the usual mount point (i.e.
for the /usr partition type we determine /usr/, and so on). We then
figure out the block device behind that path, through dm-verity and
dm-crypt if necessary. Finally, we compare the partition type uuid of
the partition found that way with the one we are supposed to fill and
only use it if it matches (the latter is primarily important on
dm-verity setups where a volume is likely backed by two partitions and
we need to find the right one).

This is particularly fun to use in conjunction with --image= (where
we'll restrict the device search onto the specify device, for security
reasons), as this allows "duplicating" an image like this:

    # systemd-repart --image=source.raw --empty=create --size=auto target.raw

If the right repart data is embedded into "source.raw" this will be able
to create and initialize a partition table on target.raw that carrries
all needed partitions, and will stream the source's file systems onto it
as configured.
2021-04-19 23:16:02 +02:00
Lennart Poettering
d83d804863 repart: add high-level setting for creating dirs in formatted file systems
So far we already had the CopyFiles= option in systemd-repart drop-in
files, as a mechanism for populating freshly formatted file systems with
files and directories. This adds MakeDirectories= in similar style, and
creates simple directories as listed. The option is of course entirely
redundant, since the same can be done with CopyFiles= simply by copying
in a directory. It's kinda nice to encode the dirs to create directly in
the drop-in files however, instead of providing a directory subtree to
copy in somehere, to make the files more self-contained — since often
just creating dirs is entirely sufficient.

The main usecase for this are GPT OS images that carry only a /usr/
tree, and for which a root file system is only formatted on first boot
via repart.  Without any additional CopyFiles=/MakeDirectories=
configuration these root file systems are entirely empty of course
initially. To mount in the /usr/ tree, a directory inode for /usr/ to
mount over needs to be created.  systemd-nspawn will do so automatically
when booting up the image, as will the initrd during boot. However, this
requires the image to be writable – which is OK for npawn and
initrd-based boots, but there are plenty tools where read-only operation
is desirable after repart ran, before the image was booted for the first
time. Specifically, "systemd-dissect" opens the image in read-only to
inspect its contents, and this will only work of /usr/ can be properly
mounted. Moreover systemd-dissect --mount --read-only won't succeed
either if the fs is read-only.

Via MakeDirectories= we now provide a way that ensures that the image
can be mounted/inspected in a fully read-only way immediately after
systemd-repart completed. Specifically, let's consider a GPT disk image
shipping with a file usr/lib/repart.d/50-root.conf:

       [Partition]
       Type=root
       Format=btrfs
       MakeDirectories=/usr
       MakeDirectories=/efi

With this in place systemd-repart will create a root partition when run,
and add /usr and /efi into it as directory inods. This ensures that the
whole image can then be mounted truly read-only anf /usr and /efi can be
overmounted by the /usr partition and the ESP.
2021-04-19 23:16:02 +02:00
Lennart Poettering
252d626711 repart: add --image= switch
This is similar to the --image= switch in the other tools, like
systemd-sysusers or systemd-tmpfiles, i.e. it apply the configuration
from the image to the image.

This is particularly useful for downloading minimized GPT image, and
then extending it to the desired size via:

   # systemd-repart --image=foo.image --size=5G
2021-04-19 23:16:02 +02:00
Jason Francis
941c5275ea
sd-login: fix wrong constructor used in sd_login_monitor manpage example 2021-04-19 12:20:29 -04:00
Yu Watanabe
4e6c50a5d4 core: add RestrictAddressFamilies=none to deny all address families
Closes #15753.
2021-04-19 11:47:08 +01:00
Zbigniew Jędrzejewski-Szmek
b7c3447a2f
Merge pull request #19310 from yuwata/network-dhcp-anonymize
network: dhcp4: several fixes and cleanups for Anonymize=
2021-04-16 11:12:22 +02:00
Anita Zhang
169be51f94 man: correct requirements for systemd-oomd.service
Fixes: #19331
2021-04-16 09:50:44 +01:00
Yu Watanabe
a2b1572ce4
Merge pull request #19287 from yuwata/network-manage-foreign-routing-policy-rule-19106
network: add ManageForeignRoutingPolicyRules= boolean setting
2021-04-14 19:01:41 +09:00
Yu Watanabe
86d58c8625 man: update explanation for Anonymize= 2021-04-14 14:15:15 +09:00
LetzteInstanz
6dc4531d16 wait-online: wait for address family
This introduce -4 and -6 commandline options.
2021-04-14 09:00:08 +09:00
LetzteInstanz
8430841b5e network: save IPv4/IPv6 address states into state file
This also introduces RequiredFamilyForOnline= setting to .network file,
and IPv4AddressState/IPv6AddressState DBus properties.
2021-04-14 08:51:02 +09:00
Yegor Alexeyev
21b6b87eb3 dhcp: Implemented BindToInterface= configuration option 2021-04-14 07:30:40 +09:00
Yu Watanabe
f1a5c566c1 man: fix typo 2021-04-13 12:52:56 +09:00
Yu Watanabe
3fe23a96d6 man: update description for ManageForeignRoutes= 2021-04-13 12:23:59 +09:00
Yu Watanabe
d94dfe7053 network: introduce ManageForeignRoutingPolicyRules= boolean setting in networkd.conf
The commit 0b81225e57 makes that networkd
remove all foreign rules except those with "proto kernel".

But, in some situation, people may want to manage routing policy rules
with other tools, e.g. 'ip' command. To support such the situation,
this introduce ManageForeignRoutingPolicyRules= boolean setting.

Closes #19106.
2021-04-13 12:22:42 +09:00
Zbigniew Jędrzejewski-Szmek
7c5fd25119 meson: do not fail if rsync is not installed with meson 0.57.2
https://github.com/mesonbuild/meson/issues/8641

Our CI started to fail. Even if the change is reverted in meson,
we need a quick workaround here.
2021-04-12 21:28:23 +01:00
Zbigniew Jędrzejewski-Szmek
839eb4a458
Merge pull request #13496 from wat-ze-hex/custom-bpf-progs-parameterized-3
bpf: extend bpf cgroup program support
2021-04-12 14:31:42 +02:00
gaoyi
45f5efdea7 man: fix discriptions for --exec-delay
There are two ambiguity in the original description:
1. It will delay all RUN instructions, include builtin.
2. It will delay before running RUN, not each of RUN{program} instructions.
2021-04-12 13:03:26 +02:00
Yu Watanabe
37b7a716d3
Merge pull request #19164 from mmatsuya/main
tmpfiles: use a entry in hashmap as ItemArray in read_config_file()
2021-04-11 16:46:25 +09:00
Julia Kartseva
9e009a145d dbus-cgroup: add BPFProgram= dbus support
- Handle BPFProgram= property in string format
"<bpf_attach_type>:<bpffs_path>", e.g. egress:/sys/fs/bpf/egress-hook.
- Add dbus getter to list foreign bpf programs attached to a cgroup.
2021-04-09 20:28:47 -07:00
Julia Kartseva
ee08909059 man: add BPFProgram= documentation 2021-04-09 20:28:47 -07:00
Zbigniew Jędrzejewski-Szmek
5c91fdf3f8 man: document system-systemd\x2dcryptsetup.slice
As discussed in
1dc85eff1d (r606821495),
follow-up for commit 1dc85eff1d.
2021-04-09 10:38:09 +02:00
Zbigniew Jędrzejewski-Szmek
708b299203
Merge pull request #19254 from poettering/native-journal-proto-doc
document native journal protocol
2021-04-09 08:13:21 +02:00
Zbigniew Jędrzejewski-Szmek
8649ec4725
Merge pull request #19248 from keszybz/make-tests-test
Make tests test
2021-04-09 07:56:04 +02:00
Lennart Poettering
8ee62e53e8 man: link up new journal protocol docs 2021-04-08 22:16:58 +02:00
Zbigniew Jędrzejewski-Szmek
b9bfa250f2 homectl,TEST-46: fix test and fix homectl return value, update docs
The usual: the test wasn't testing, so we didn't notice that the
command wasn't returning as expected.
2021-04-08 20:21:50 +02:00
Zbigniew Jędrzejewski-Szmek
b88ba6c761 tmpfiles: make handling of existing-but-different targets more consistent
create_fifo() was added in a2fc2f8dd3, and
would always ignore failure. The test was trying to fail in this case, but
we actually don't fail, which seems to be correct. We didn't notice before
because the test was ineffective.

To make things consistent, generally log at warning level, but don't propagate
the error. For symlinks, log at debug level, as before.

For 'e', failure is not propagated now. The test is adjusted to match.

I think warning is appropriate in most cases: we do not expect a device node to
be replaced by a different device node or even a non-device file. This would
most likely be an error somewhere. An exception is made for symlinks, which are
mismatched on purpose, for example /etc/resolv.conf. With this patch, we don't
get any warnings with the any of the 74 tmpfiles.d files, which suggests that
increasing the warning levels will not cause too many unexpected warnings. If
it turns out that there are valid cases where people have expected mismatches
for non-symlink types, we can always decrease the log levels again.
2021-04-08 20:16:37 +02:00
Zbigniew Jędrzejewski-Szmek
3bbb76f621 sd-bus: make sd_bus_is_{ready,open} accept NULL
We didn't document this behaviour one way or another, so I think it's
OK to change. All callers do the NULL check before callling this to avoid
the assert warning, so it seems reasonable to do it internally.

sd_bus_can_send() is similar, but there we expressly say that an
error is returned on NULL, so I didn't change it.
2021-04-08 14:59:10 +02:00
Zbigniew Jędrzejewski-Szmek
3dd61ee5be man: fix quickhelp listing in tmpfiles.d(5)
Unlike many other small/big letter combos, this one has the recursive
version attached to the lowercase letter.
2021-04-08 11:01:29 +02:00
Luca Boccassi
671769c932 coredump: rename COREDUMP_PKGMETA_ fields to COREDUMP_PACKAGE_
Follow-up for c546154a44
2021-04-07 14:02:38 +01:00
Morten Linderud
29d898cc7b man/systemd-cryptenroll: Fix sd-boot manvolnum from 8 to 7
Off-by-one error in the documentation index. The volume number for
systemd-boot/sd-boot is 7.

Signed-off-by: Morten Linderud <morten@linderud.pw>
2021-04-07 13:57:33 +02:00
Luca Boccassi
c546154a44 coredump: parse and append package metadata to journal message
Append 'package' and 'packageVersion' to the journal as discrete fields
COREDUMP_PKGMETA_PACKAGE and COREDUMP_PKGMETA_PACKAGEVERSION respectively,
and the full json blurb as COREDUMP_PKGMETA_JSON.
2021-04-06 23:12:51 +01:00
Zbigniew Jędrzejewski-Szmek
9d5ae3a121
Merge pull request #19126 from anitazha/oomdimprovements
systemd-oomd post-test week improvements
2021-04-06 07:59:59 +02:00
Anita Zhang
685b0985f0 oomd: threshold swap kill candidates to usages of more than 5%
In some instances, particularly with swap on zram, swap used will be high
while there is still a lot of memory available. FB OOMD handles this by
thresholding kills to X% of total swap usage. Let's do the same thing here.

Anecdotally with these thresholds and my laptop which is exclusively swap
on zram I can sit at 0K / 4G swap free with most of memory free and
systemd-oomd doesn't kill anything.

Partially addresses aggressive kill behavior from
https://bugzilla.redhat.com/show_bug.cgi?id=1941170
2021-04-05 02:04:49 -07:00
Viktor Mihajlovski
a496a238e8 udev: fix slot based network names on s390
The s390 PCI driver assigns the hotplug slot name from the
function_id attribute of the PCI device using a 8 char hexadecimal
format to match the underlying firmware/hypervisor notation.

Further, there's always a one-to-one mapping between a PCI
function and a hotplug slot, as individual functions can
hot plugged even for multi-function devices.

As the generic matching code will always try to parse the slot
name in /sys/bus/pci/slots as a positive decimal number, either
a wrong value might be produced for ID_NET_NAME_SLOT if
the slot name consists of decimal numbers only, or none at all
if a character in the range from 'a' to 'f' is encountered.

Additionally, the generic code assumes that two interfaces
share a hotplug slot, if they differ only in the function part
of the PCI address. E.g., for an interface with the PCI address
dddd:bb:aa.f, it will match the device to the first slot with
an address dddd:bb:aa. As more than one slot may have this address
for the s390 PCI driver, the wrong slot may be selected.

To resolve this we're adding a new naming schema version with the
flag NAMING_SLOT_FUNCTION_ID, which enables the correct matching
of hotplug slots if the device has an attribute named function_id.
The ID_NET_NAME_SLOT property will only be produced if there's
a file /sys/bus/pci/slots/<slotname> where <slotname> matches
the value of /sys/bus/pci/devices/.../function_id in 8 char
hex notation.

Fixes #19016
See also #19078
2021-04-02 18:08:23 +02:00
Carlo Teubner
6d3831cee5 docs: use current spelling "macOS" not "OS X" etc. 2021-04-02 10:53:26 +01:00
Anita Zhang
a858355e4a oomd: force DefaultMemoryPressureDurationSec= to be greater than or equal 1 sec 2021-04-01 19:53:42 -07:00
Zbigniew Jędrzejewski-Szmek
af46237ea1 man: split the description of sd_bus_error_set()
It was one giant all of text in pseudo-random order. Let's split it into
paragraphs talk about one subject each.

And unfortunately, the description of what happens when the error is not
set was not correct. In general, various functions treat 0/NULL as
not-an-error, and return 0.
2021-03-31 18:24:53 +02:00
Luca Boccassi
907952bbc9 portabled: add --extension parameter for layered images support
Add an --extension parameter to portablectl, and new DBUS methods
to attach/detach/reattach/inspect.
Allows to append separate images on top of the root directory (os-release
will be searched in there) and mount the images using an overlay-like
setup (unit files will be searched in there) using the new ExtensionImages
service option.
2021-03-31 09:56:44 +01:00
Deepak Rawat
0d96caa5c0 logind: Add new flag for kexec reboot
Add new flag to allow kexec reboot if kernel is already loaded.
2021-03-31 10:48:48 +02:00
Lennart Poettering
9a515f0a55 shared: add new IMAGE_VERSION=/IMAGE_ID= field to /etc/os-release
This specifes two new optional fields for /etc/os-release:
IMAGE_VERSION= and IMAGE_ID= that are supposed to identify the image of
the current booted system by name and version.

This is inspired by the versioning stuff in
https://github.com/systemd/mkosi/pull/683.

In environments where pre-built images are installed and updated as a
whole the existing os-release version/distro identifier are not
sufficient to describe the system's version, as they describe only the
distro an image is built from, but not the image itself, even if that
image is deployed many times on many systems, and even if that image
contains more resources than just the RPMs/DEBs.

In particular, "mkosi" is a tool for building disk images based on
distro RPMs with additional resources dropped in. The combination of all
of these together with their versions should also carry an identifier
and version, and that's what IMAGE_VERSION= and IMAGE_ID= is supposed to
be.
2021-03-31 10:46:22 +02:00
Zbigniew Jędrzejewski-Szmek
a2dc3adef2
Merge pull request #18990 from yuwata/network-dhcpv6-use-domains
network: also introduce UseDomains= for [DHCPv6] section
2021-03-31 10:38:37 +02:00
Lennart Poettering
e0b4bc239f machine-id-setup: support --image= mode 2021-03-31 10:35:31 +02:00
Lennart Poettering
f9d8325e69
Merge pull request #18971 from poettering/sysusers-creds
let's read LoadCredentials=/SetCredentials= style cred in sysusers/firstboot and when asking for passwords
2021-03-31 10:35:17 +02:00
Henri Chain
cb0e818f7c Introduce ExitType 2021-03-31 10:26:07 +02:00
Lennart Poettering
8806bb4bc7 ask-password: when querying for a password, try to read from credential store first
This adds generic support for the SetCredential=/LoadCredential= logic
to our password querying infrastructure: if a password is requested by a
program that has a credential store configured via
$CREDENTIALS_DIRECTORY we'll look in it for a password.

The "systemd-ask-password" tool is updated with an option to specify the
credential to look for.
2021-03-26 12:21:56 +01:00
Lennart Poettering
f6ab6199a2 man: document in nspawn docs how to make use of the new firstboot/sysusers features 2021-03-26 12:21:37 +01:00
Lennart Poettering
416f7b3a11 firstboot: allow provisioning of firstboot params via creds too 2021-03-26 12:21:18 +01:00
Lennart Poettering
99e9f896fb sysusers: read passwords from the credentials logic
Let's make use of our own credentials infrastructure in our tools: let's
hook up systemd-sysusers with the credentials logic, so that the root
password can be provisioned this way. This is really useful when working
with stateless systems, in particular nspawn's "--volatile=yes" switch,
as this works now:

 # systemd-nspawn -i foo.raw --volatile=yes --set-credential=passwd.plaintext-password:foo

For the first time we have a nice, non-interactive way to provision the
root password for a fully stateless system from the container manager.
Yay!
2021-03-26 12:20:52 +01:00
Lennart Poettering
8a29862e32 core: allow omitting second part of LoadCredentials= argument
This allows "LoadCredentials=foo" to be used as shortcut for
"LoadCredentials=foo:foo", i.e. it's a very short way to inherit a
credential under its original name from the service manager into a
service.
2021-03-26 12:20:29 +01:00
David Tardon
f055cf7786 man: document differences in clean exit status for Type=oneshot
See commit 1f0958f640 .
2021-03-23 09:33:23 +01:00
Christian Hesse
3babb81625 man: rate limited services can be restartet from timer or socket
If rate limiting kicks in for Restart= logic it is still possible for a
timer or socket to restart the service.
2021-03-23 09:16:30 +01:00
Zbigniew Jędrzejewski-Szmek
ccd593a61c man: say that .device units need udev
This was implied by the need to tag them with "systemd", but let's make this
obvious, since it's rather easy to trip over this as a user.

Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=1941458.
2021-03-22 21:48:45 +01:00
igo95862
ca1eacd8e0 man: Specify that only d-bus methods can be answered async
Not properties.
2021-03-17 16:15:56 +01:00
Luca Boccassi
301e7cd047 man: specify that ProtectProc= does not work with root/cap_sys_ptrace
When using hidepid=invisible on procfs, the kernel will check if the
gid of the process trying to access /proc is the same as the gid of
the process that mounted the /proc instance, or if it has the ptrace
capability:

https://github.com/torvalds/linux/blob/v5.10/fs/proc/base.c#L723
https://github.com/torvalds/linux/blob/v5.10/fs/proc/root.c#L155

Given we set up the /proc instance as root for system services,
The same restriction applies to CAP_SYS_PTRACE, if a process runs with
it then hidepid=invisible has no effect.

ProtectProc effectively can only be used with User= or DynamicUser=yes,
without CAP_SYS_PTRACE.
Update the documentation to explicitly state these limitations.

Fixes #18997
2021-03-15 16:53:16 +00:00
Yu Watanabe
b63dae3168 man: DNS/NTP servers received from DHCP server are concatenated with the statically configured ones
Prompted by #9473.
2021-03-15 14:48:47 +00:00
Yu Watanabe
f225a338c3 network: also introduce UseDomains= for [DHCPv6] section
When we split [DHCP] section into [DHCPv4] and [DHCPv6], UseDomains=
setting was forgot to be introduced in [DHCPv6] section.
2021-03-14 00:28:19 +09:00
Luca Boccassi
495787b56c
Merge pull request #18978 from keszybz/man-rc.local
Suggest network-online.target for rc.local
2021-03-12 14:54:12 +00:00
Zbigniew Jędrzejewski-Szmek
eb0845dfb8 man: mention network-online.target in discussion of rc.local
Replacement for #18853.
2021-03-12 11:22:58 +01:00
Zbigniew Jędrzejewski-Szmek
ba3dc45126 man: fix html links to two external man pages 2021-03-12 10:58:16 +01:00
Zbigniew Jędrzejewski-Szmek
21bee820ab man: sd_bus_message_reply()→sd_bus_message_send()
Fixup for 6c41cf4459.
2021-03-12 10:58:16 +01:00
Zbigniew Jędrzejewski-Szmek
45b218b058 man: also refname rc-local.service to the generator man page
This makes it easier to find for users.
2021-03-12 09:04:59 +01:00
ulf-f
2d8ce4c701 Update resolvectl.xml
fixed typo of filename
2021-03-11 19:24:53 +01:00
Lennart Poettering
170c659338 man: shorten list of partition types a bit
Tables with only one column aren't really tables, they are lists. And if
each cell only consists of a single word, they are probably better
written in a single line. Hence, shorten the man page a bit, and list
boot loader spec partition types in a simple sentence.

Also, drop "root-secondary" from the list. When dissecting images we'll
upgrade "root-secondary" to "root" if we mount it, and do so only if
"root" doesn't exist. Hence never mention "root-secondary" as we never
will mount a partition under that id.
2021-03-11 12:04:13 +01:00
Yu Watanabe
266d0bb9e0 man: update document about NoNewPrivileges=
Fixes #18914.
2021-03-08 21:42:06 +09:00
Carlo Wood
57f69536a8
Manual page fixes (#18906) 2021-03-07 02:54:33 +09:00
Yu Watanabe
e406e8a29a udev/net: make .link files support drop-in config 2021-03-05 08:09:01 +09:00
Yu Watanabe
005c7b1d88 journal: make namespace invocation also support drop-in config 2021-03-05 06:57:14 +09:00
Lennart Poettering
44a8ad7a24 man: document how to use --network-interface= during boot
Fixes: #18793
2021-03-04 18:55:36 +01:00
Xℹ Ruoyao
a70581ffb5
New directives PrivateIPC and IPCNamespacePath 2021-03-04 00:04:36 +08:00
Lennart Poettering
725ad3b062 fstab-generator: add new root=tmpfs option
It's useful to be able to combine a regular /usr/ file system with a
tmpfs as root, for an OS that boots up in volatile mode on every single
boot.  Let's add explicit support for this via root=tmpfs.

Note the relationship to the existing systemd.volatile= option:

1. The kernel command line "root=/dev/… systemd.volatile=yes" will mount
   the specified root fs, and then hide everything at the top by
   overmounting it with a tmpfs, except for the /usr subtree.

2. The kernel command line "root=tmpfs mount.usr=/dev/…" otoh will mount
   a toot fs at the top (just like the case above), but will then mount
   the top-level dir of the fs specified in mount.usr= directly below
   it.

Or to say this differently: in the first case /usr/ from the physical
storage fs is going to become /usr/ of the hierarchy ultimately booted,
while in the second case / from the physical storage fs is going to
become /usr of the hierarchy booted.

Philosophically I figure systemd.volatile= is more an option for
"one-off" boots, while root=tmpfs is something to have as default mode
of operation for suitable images.

This is currently hard to test reasonably, since Dracut refuses to
accept root=tmpfs. This needs to be addressed separately though.
2021-03-03 12:16:32 +09:00
Luca Boccassi
7e40042b55 man: document usage of SD_BUS_CREDS_AUGMENT 2021-03-02 12:18:53 +01:00
Lennart Poettering
0498d8d74a
Merge pull request #18841 from keszybz/a-bunch-of-man-page-updates
Two minor small man page updates
2021-03-02 11:03:44 +01:00
Yu Watanabe
7a7d2f16c2 tree-wide: fix typo 2021-03-02 09:48:20 +01:00
Zbigniew Jędrzejewski-Szmek
33360f35a1 man: reword sentence about lone coredumps
Let's make it clear that they are not as useful as the full thing.
2021-03-02 09:37:49 +01:00
Zbigniew Jędrzejewski-Szmek
c53e8b9de6 man: add note about "SIG" prefix 2021-03-02 09:35:22 +01:00
Zbigniew Jędrzejewski-Szmek
1447d87a47 man: document \u and \U, say that utf-8 is allowed 2021-03-01 20:57:36 +01:00
Zbigniew Jędrzejewski-Szmek
07dc08c269 man: move two sysv-specific variables to docs
https://github.com/systemd/systemd/pull/18827#discussion_r584807684
2021-03-01 20:57:36 +01:00
Zbigniew Jędrzejewski-Szmek
40019c32d7 man: clarify what is inside/outside the container in coredump info 2021-03-01 20:57:36 +01:00
Zbigniew Jędrzejewski-Szmek
a1174b2260 man: update link to systemd-coredump-python
This got moved under the systemd umbrella a long time ago.
Github redirects from the old path, so the link worked, but it's
nicer to use the real location.
2021-03-01 20:53:57 +01:00
Zbigniew Jędrzejewski-Szmek
cd18afec16
Merge pull request #18827 from keszybz/a-bunch-of-man-page-updates
A bunch of man page updates
2021-03-01 15:14:40 +01:00
Zbigniew Jędrzejewski-Szmek
dac05c0808 man: say that machine-info doesn't have to exist
Esp. CHASSIS is only useful as an override. Make that clear in the description.

Fixes #3496.
2021-03-01 13:40:52 +01:00
Zbigniew Jędrzejewski-Szmek
aa2e348d7b man: tweak descriptions of how tmpfiles should be started
We shouldn't imply that invocation without any parameters is OK.
Also, mention that the service can be restarted.

Fixes #8684.
2021-03-01 13:40:52 +01:00
Zbigniew Jędrzejewski-Szmek
e531091ba0 man: describe quoting and specifiers in Environment=
Fixes #10604.
2021-03-01 13:40:52 +01:00
Zbigniew Jędrzejewski-Szmek
4d729e3796 man: move quoting description to systemd.syntax
We use very similar quoting rules in many places. Let's move this
lengthy text out of systemd.service page.
2021-03-01 13:40:52 +01:00
Zbigniew Jędrzejewski-Szmek
36f57e02d7 man: explain how to invoke tmpfiles for debugging
Fixes #11914.
2021-03-01 13:40:52 +01:00
Zbigniew Jędrzejewski-Szmek
5929b6b522 man: mention that != matches nonexistent keys too
Fixes #15984.
2021-03-01 13:40:52 +01:00
Zbigniew Jędrzejewski-Szmek
9479d92ebc man: reorder match types in udev rules
The plural version should always be adjacent to the singular one.
And the plural should not be explained before the singular one…
2021-03-01 13:40:52 +01:00
Zbigniew Jędrzejewski-Szmek
32f82cccea man: add footnote explaining why "localhost" query is sent out to the network
I tried to make the explanation brief, but this isn't so easy. It seems better
to push this out to a footnote instead of the main text.

Fixes #16584.
2021-03-01 13:40:52 +01:00
Zbigniew Jędrzejewski-Szmek
9273d8e6c9 man: move motivational explanation to footnote 2021-03-01 13:40:52 +01:00
Zbigniew Jędrzejewski-Szmek
fc070a2574 man: describe the syntax for {Job,}{Running,}TimeoutSec=
Fixes #16644.

Also break the text into paragraphs to make it a bit easier to read.
2021-03-01 13:40:52 +01:00
Zbigniew Jędrzejewski-Szmek
09d9081447 man: move description of $SYSTEMD_SYSVINIT_PATH to the only user 2021-03-01 13:40:52 +01:00
Zbigniew Jędrzejewski-Szmek
b4c87f7d38 man: reuse common-variables in systemd(1)
This requires a bit of gimnastics, but I think it's still better than
status quo ante, and better than duplicating the text.
2021-03-01 13:40:52 +01:00
Zbigniew Jędrzejewski-Szmek
5bd27a17ca man: describe various logging configuration variables
Fixes #17484.

This patch affects systemctl(1), as well as all man pages that include
all of common-variables.xml, i.e. most of our command line tools.
2021-03-01 13:40:52 +01:00
Zbigniew Jędrzejewski-Szmek
4ef3ca3447 man: rename less-variables→common-variables
Some are not about less, e.g. $SYSTEMD_URLIFY.
2021-03-01 13:40:52 +01:00
Zbigniew Jędrzejewski-Szmek
9d58abfa25 man: describe coredump fields
We save a wealth of information about the process, but this might not be
immediately obvious.
2021-03-01 13:40:52 +01:00
Lajos Veres
5773351881 Fix path typo in systemd.unit
/etc/systemd/systemd/ => /etc/systemd/system/
2021-03-01 08:45:19 +09:00
Zbigniew Jędrzejewski-Szmek
4f57f77267 man: make systemd-coredump and coredumpctl descriptions more accessible
Fixes #17910: we didn't clearly explain that coredumps may exist without
journal entries, and vice versa.

Also, make the examples more concrete, and use '$' instead of '#' to avoid
suggesting that running as root is required. The text is extended a bit in
various places. In the description of systemd-coredump, the details of executor
separation are split out to a separate subsection, since they are rather
detailed and not necessary to understand for normal use.
2021-02-28 11:29:21 +01:00
Lennart Poettering
fa1ca5f409
Merge pull request #18800 from poettering/network-target-more-doc
some improvements regarding network.target docs
2021-02-26 10:59:23 +01:00
Lennart Poettering
85f3bd23da man: say explicitly that network.target should give the guarantee that synthetic network interfaces have been created
Prompted by: #18793
2021-02-26 09:31:11 +01:00
Lennart Poettering
26ac511a7e man: be more explicit about network-online.target and consuming services of other hosts
Let's make things a tiny bit more explicit.
2021-02-26 09:29:52 +01:00
Lennart Poettering
8b596d51a9 man: fix indentation of example
The man page otherwise looks very weirdly aligned.
2021-02-26 09:29:52 +01:00
Zbigniew Jędrzejewski-Szmek
34507fa9e9 man: remove details of ManagedOOMPreference implementation 2021-02-25 21:14:04 +01:00
Zbigniew Jędrzejewski-Szmek
a8136f1bc0 man: advertise shared drop-ins more
systemd.unit(5) is a wall of text. And this particular feature can be very useful
in the context of resource control. Let's avertise this cool feature a bit more.

Fixes #17900.
2021-02-25 21:14:04 +01:00
Zbigniew Jędrzejewski-Szmek
4fc8a70d9f man: fix two issues in udev(7)
Fixed #18050.
2021-02-25 21:14:04 +01:00
Zbigniew Jędrzejewski-Szmek
9f0840e421 man: say that hostname must can be a fqdn or not
Fixes #18426
2021-02-25 21:14:04 +01:00
Zbigniew Jędrzejewski-Szmek
c91ebcdbd1 man: explain settings in timesyncd.conf(5)
Fixes #18508.
2021-02-25 21:14:04 +01:00
Zbigniew Jędrzejewski-Szmek
d5630d2795 man: drop misplaced spaces and parenthesization 2021-02-25 21:14:04 +01:00
Zbigniew Jędrzejewski-Szmek
326152af4d man: use markup more in description of ManagedOOMPreference=
Follow-up for d8a4d64bc3.
2021-02-25 21:14:04 +01:00
Zbigniew Jędrzejewski-Szmek
beca342dba man: fix grammaro 2021-02-25 14:55:17 +01:00
Zbigniew Jędrzejewski-Szmek
155d626bc6
Merge pull request #18018 from bluca/mount_images_overlay
Add ExtensionImages directive to form overlays
2021-02-25 11:31:14 +01:00
Joerg Behrmann
fa02711758 treewide: fix spelling 2021-02-25 05:54:11 +09:00
Annika Wickert
c0267a592a network: Implement B.A.T.M.A.N. Advanced interface type 2021-02-25 01:57:29 +09:00
Yu Watanabe
b49bb2866c doc,man: fix-typo (hierachy -> hierarchy) 2021-02-24 09:54:16 +01:00
Zbigniew Jędrzejewski-Szmek
d515864346 man: add a description of how manager env block is set 2021-02-23 17:18:05 +01:00
Luca Boccassi
93f597013a Add ExtensionImages directive to form overlays
Add support for overlaying images for services on top of their
root fs, using a read-only overlay.
2021-02-23 15:34:46 +00:00
Lennart Poettering
3acf00a5a4 man: various improvements to systemd.generator(7)
In particular, make clear the .d/*.conf unit file drop-ins are OK to
generate from generators.

Inspired by: https://lists.freedesktop.org/archives/systemd-devel/2021-February/046148.html
2021-02-23 22:44:05 +09:00
Zbigniew Jędrzejewski-Szmek
8ebfd50aaf shared/condition: add ConditionControlGroupController=v1|v2
Before, we only allowed conditionalizing on controllers, not the hierarchy.
This commit extends this to allow a simple check for v1 (i.e. classic or hybrid),
and v2 (full unified).

An alternative approach would be to add a separate Condition for this, but I'm
not too keen on that, considering that v1 is already being deprecrecated
(c.f. 82f3063218).
2021-02-23 01:11:18 +01:00
Zbigniew Jędrzejewski-Szmek
a5e5e102ba
Merge pull request #18704 from keszybz/fallback-hostame-override
Allow overriding of fallback hostname through envvar and os-release field
2021-02-23 00:41:27 +01:00
Yu Watanabe
c83e44110c
Merge pull request #18718 from yuwata/network-nexthop-blackhole
network: introduce Blackhole= setting in [NextHop] section
2021-02-23 04:44:12 +09:00
Zbigniew Jędrzejewski-Szmek
8770c8135b hostnamed: rename FallbackHostname to DefaultHostname
This follows the addition of DEFAULT_HOSTNAME= in os-release.
The distinction between the value from os-release or the env var and
the compile-time setting is not made in the api: HostnameSource is
"default" is all cases. I think that this level of detail is not needed,
because the users of this mostly care whether the hostname was set by
user configuration or not.
2021-02-22 20:10:55 +01:00
Zbigniew Jędrzejewski-Szmek
addddf565b os-release: add the DEFAULT_HOSTNAME= setting
The motivation is that variants of the same distro that share the same compiled
rpm want to customize various aspects of the system, in particular the
hostname. In some sense the default hostname is part of the identity of the
system, so setting it through os-release makes sense. In particular, instead of
setting a default value in /etc/hostname, the appropriate default can be baked
into the image, leaving /etc/hostname for local overrides only.

Why make this a separate field instead of e.g. using NAME from os-release?
NAME is already used for other purposes, and it seems likely that people want
to set those independently.
2021-02-22 20:10:55 +01:00
Zbigniew Jędrzejewski-Szmek
aa96ef86a7 man: use ~/.config instead of XDG_CONFIG_HOME
e3820eeaf1 did that replacement XDG_CONFIG_HOME, in one
of two places. Let's use ~/.config everywhere.

Quoting https://github.com/systemd/systemd/pull/18704#discussion_r579465254:
> I'd really drop XDG_CONFIG_HOME from the docs. It's confusing enough as it
> is. Where we don't need the indirections we should not confuse people with
> it, in particular as people might then think it's actually a good idea to use
> that env var and redirect things. I'd just show the literal path everywhere,
> even if we internally use the env var.
2021-02-22 20:10:55 +01:00
Zbigniew Jędrzejewski-Szmek
d55ed7de34 manager: add ManagerEnvironment configuration setting
This is useful for various variables that modify process behaviour. This makes
it easy to set it for pid1 without touching the kernel command line. Even for
the *user manager* this also can be convenient for the unprivileged user, who
cannot modify user@.service definition.

Variables that could be set like this include $SD_EVENT_PROFILE_DELAYS,
$SYSTEMD_FALLBACK_HOSTNAME, $SYSTEMD_MEMPOOL, $SYSTMED_RDRAND, etc.
2021-02-22 20:10:55 +01:00
Yu Watanabe
30f1083709 network: nexthop: add Blackhole= setting in [NextHop] section
As similar to unreachable type routes, blackhole nexthops do not have
NHA_OID attribute, so they are managed by Manager.
2021-02-23 02:21:17 +09:00
Lennart Poettering
0a6aa7a238 man: try to improve documentation of conditions/asserts
Fixes: #18725
2021-02-22 18:12:34 +01:00
Lennart Poettering
c6e33c293e man: correct documentaiton of StandardInput='s defaults in regards to "data"
Fixes: #18710
2021-02-22 17:52:20 +01:00
Zbigniew Jędrzejewski-Szmek
b332778b30
Merge pull request #18684 from yuwata/sd-device-cleanups-and-udevadm-fix
sd-device, udev: several cleanups and one udevadm fix
2021-02-22 11:32:38 +01:00
Zbigniew Jędrzejewski-Szmek
f70e6fb471 manager: read ~/.config/systemd/user.conf in user mode
This changes the paths we read user manager config from in two ways:

- split-usr-root paths are dropped. The user manager is a poster boy for
  non-early-boot, so reading dropins only from /usr is appropriate.

- we look at ~/.config/systemd/user.conf. Users should be allowed to override
  their own config.

As user managers become more and more used, it becomes more important for users
to customize their own daemon. By reading from ~/.config, this is possible
without privileges.
2021-02-22 10:03:07 +01:00
Benjamin Robin
086c9fbc03 man: Small fix of sd_bus_message_send() man page 2021-02-21 20:26:51 +01:00
Tyler Hicks
e4d54220a1 man: correct the unit file directory for attached images
Commit 83f72cd65f ("man,docs: document the new unit file directory for
attached images") updated the docs and man page with the new unit file
directory for attached images but included a system.attached ->
systemd.attached typo in the man page portion of the change. Fix the
typo to document the correct path.
2021-02-21 19:19:18 +00:00
Yu Watanabe
5e63f2915b man: fix typo 2021-02-21 19:20:47 +01:00
Yu Watanabe
2ddd52d1e2 network: nexthop: add OnLink= setting 2021-02-21 05:16:23 +09:00
Yu Watanabe
6c99c26500 udevadm-trigger: introduce --quiet option
This may be useful to invoke the command by non-privileged users.
2021-02-21 04:40:23 +09:00
Lennart Poettering
cd6d2111c4 man: split out sd_bus_set_fd() man page from sd_bus_get_fd()
sd_bus_get_fd() and related calls are useful for integrating a bus
connection into arbitrary event loops. But sd_bus_set_fd() is quite a
different beast, it's for using D-Bus over pre-initialized sockets or
pairs of fifos or stuff, i.e. very advanced stuff.

Let's split this man page in two, in order not to confuse things
needlessly.

And while we are at it, let's slightly extend the documentation.
2021-02-20 16:13:06 +01:00
Yu Watanabe
832583ada8 network: make Broadcast= accept boolean value
And disable it for wireguard interfaces by default.

Closes #18492.
2021-02-20 14:23:00 +09:00
Yu Watanabe
7f37ecf7e5
Merge pull request #18699 from yuwata/network-route-add-nexthop-setting
network: add NextHop= setting in [Route] section
2021-02-20 14:17:17 +09:00
Lennart Poettering
6c41cf4459 sd-bus: simplify sd_bus_reply()
there's no point in having two arguments, if one does as well.
2021-02-20 13:44:02 +09:00
Lennart Poettering
5cfbe7452f man: emphasize a bit more that PID files suck 2021-02-19 17:51:31 +01:00
Lennart Poettering
04955f7c61
Merge pull request #18694 from keszybz/links-and-syntax-highlighting
Links and syntax highlighting
2021-02-19 15:27:41 +01:00
Yu Watanabe
324e342219 network: add NextHop= setting in [Route] section 2021-02-19 22:42:39 +09:00
Zbigniew Jędrzejewski-Szmek
3d81e41190
Merge pull request #18646 from yuwata/network-ip-masquerade-follow-ups
network: several follow-ups for recent IPMasquerade= change
2021-02-19 12:43:37 +01:00
Zbigniew Jędrzejewski-Szmek
d80961720c man: fix links to various pages
nss-dns doesn't have any man page that I could find.
2021-02-19 09:28:13 +01:00
Yu Watanabe
b480543cf0 tree-wide: fix typo 2021-02-19 07:56:22 +01:00
Yu Watanabe
4c72d851cd network: warn when any positive boolean string is specified for IPMasquerade=
Previously, any positive boolean string for IPMasquerade= enables only IPv4
masquerade. The commit 48ed276647 adds
IPv6 masquerade support. However, only "yes" is handled as "ipv4", and other
positive boolean strings are handled as "both".

This makes all positive boolean strings considered as "ipv4", warn that they
are deprecated, and suggest to use "ipv4" or "both".

Follow-up for 48ed276647.
2021-02-19 14:24:10 +09:00
Yu Watanabe
5be5d1f2a1
Merge pull request #18659 from poettering/permyriadification
use scaling relative to UINT32_MAX instead of percentages/permyriads wherever we can
2021-02-19 14:22:10 +09:00
Zbigniew Jędrzejewski-Szmek
09db71a4a3 Recommend drop-ins over modifications to the main config file
As discussed in https://github.com/systemd/systemd/pull/18347.
2021-02-19 14:05:42 +09:00
Lennart Poettering
d06e7fb532 oomd: increase accuracy of SwapUsedLimit= to permyriads too
oomd.conf has two parameters with fractionals: SwapUsedLimit= and
DefaultMemoryPressureLimit=, but one accepts permyriads, the other only
percentages, for no apparent reason. One carries the "Percent" in the
name, the other doesn't.

Let's clean this up: always accept permyriads, and drop the suffix,
given that it is misleading.

I figure we should internally try to focus on scaling everything
relative to UINT32_MAX, and if that isn't in the cards at least 10000,
but never permille nor percent unless there's a really really good
reason for it (e.g. interface defined by someone else).
2021-02-18 22:40:47 +01:00
Lennart Poettering
d9d3f05def core: use our usual UINT32_MAX scaling for OOMD limits
So far OOMD limits used permyriads, as an upgrade from the original
percent.

The rest of our codebase typically scales stuff relative to UINT32_MAX.
Let's clean this up, an make sure this happens here too. This is
particularly relevant, as this is exposed in unit files and API, and
before we mark this stable we should get the APIs right.
2021-02-18 22:39:37 +01:00
Yu Watanabe
38ba3da0a1 network: rename UseFQDN= -> UseHostname=
Prompted by
https://github.com/systemd/systemd/pull/18543#issuecomment-780798451.
2021-02-18 21:47:37 +01:00
Дамјан Георгиевски
95aa3937da man: Rename duplicate Credentials section name
A "Credentials" section name in systemd.exec man page was used
both for User/Group and for actual credentials support in systemd.

Rename the first instance to "User/Group Identity"
2021-02-18 15:40:47 +01:00
Susant Sahani
d75bf6cfe2 network: Add "route_localnet" sysctl support 2021-02-18 21:04:17 +09:00
Richard Laager
f542f3b2ed Remove outdated disable_ipv6 docs
This was changed in commit 482efedc08,
which was released in v243, to only enable and never disable IPv6.

Signed-off-by: Richard Laager <rlaager@wiktel.com>
2021-02-18 16:51:27 +09:00
Lennart Poettering
dc288ffeab
Merge pull request #18596 from keszybz/systemctl-quiet-legend
systemctl: hide legends with --quiet, allow overriding
2021-02-17 23:40:04 +01:00
Zbigniew Jędrzejewski-Szmek
6906da2692 systemctl: hide legends with --quiet, allow overriding
--no-legend is replaced by --legend=no.

--quiet now implies --legend=no, but --legend=yes may be used to override that.
--quiet controls hints and warnings and such, and --legend controls just the
legends. I think it makes sense to allow both to controlled independently, in
particular --quiet --legend makes sense when using systemctl in a script to
provide some user-visible output.

Fixes #18560.
2021-02-17 21:09:14 +01:00
Yu Watanabe
26ff450550 man: update explanations of settings in [NextHop] section 2021-02-17 15:55:37 +09:00
Giedrius Statkevičius
68337e55f6 condition: add CPUFeature
Taking a stab at implementing #14479.

Add {Condition,Assert}CPUFeature to `systemd-analyze` & friends. Implement it
by executing the CPUID instruction. Add tables for common x86/i386
features.

Tested via unit tests + checked that commands such as:

```bash
systemd-analyze condition 'AssertCPUFeature = rdrand'
```

Succeed as expected and that commands such as

```bash
systemd-analyze condition 'AssertCPUFeature = foobar'
```

Fail as expected. Finally, I have amended the `systemd.unit` manual page
with the new condition and the list of all currently supported flags.
2021-02-17 15:31:29 +09:00
Lennart Poettering
b1b4e9204c
Merge pull request #18007 from fw-strlen/ipv6_masq_and_dnat
Support ipv6 for masquerade and dnat in nspawn and networkd
2021-02-16 23:41:35 +01:00
Lennart Poettering
696e5a8a73 man: make clear that sd-journal notifications always come with extra latency
Replaces: #17699
2021-02-16 22:16:17 +01:00
Yu Watanabe
ccb4072e21 man: fix indentation 2021-02-16 17:59:21 +01:00
Lennart Poettering
018b642a98 resolvectl: clarify IDNA and search path logic in combination with "resolvectl query --type="
When low-level RR resolution is requested from "resolvectl query" via
"--type=" or "--class=" no search domain logic is applied and no IDNA
translation.

Explain this in detail in the documentation, and also mentions this when
users attempt to resolve single-label names or names with international
characters in the output.

I believe the current behaviour is correct, but it is indeed surprising.
Hence the documentation and output improvement.

Fixes: #11325 #10737
2021-02-16 09:51:17 +01:00
Zbigniew Jędrzejewski-Szmek
e557c82dd5
Merge pull request #18571 from bluca/portable_dbus_doc
portable: use helpers for DBUS registration and document DBUS interface
2021-02-16 08:30:27 +01:00
Zbigniew Jędrzejewski-Szmek
8f50eb04ac
Merge pull request #18481 from keszybz/rpm-restart-post-trans
Restart units after the rpm transaction
2021-02-16 08:25:49 +01:00
Luca Boccassi
23e5c8d296 portabled: add DBUS documentation 2021-02-15 21:34:00 +00:00
Zbigniew Jędrzejewski-Szmek
c9615f7352 systemctl: add "reload-or-restart --marked"
This is almost equivalent to 'busctl call-method org.freedesktop.systemd1
/org/freedesktop/systemd1 org.freedesktop.systemd1.Manager EnqueueMarkedJobs',
but waits for the jobs to finish.
2021-02-15 20:49:14 +01:00
Zbigniew Jędrzejewski-Szmek
70666e28a1 core: add EnqueueMarkedJobs method to reload/restart marked units
We support two return types for methods that start jobs. EnqueueJob support the
full-monty mode with affected jobs. I didn't do this here, since it seems
unlikely to be used. In the common case there'd be a huge list of jobs and
affected jobs. EnqueueMarkedJobs() just returns a list of jobs that we can wait
upon.

The name of the method is generic in case we decide to add something other than
just reload/restart later on.

When errors occur, resource errors are treated as fatal, but for other error
types we queue up other jobs, and only return an error at the end. The
assumption is that the caller will ignore the result error anyway, so it's
better to try to reload/restart as much as possible.
2021-02-15 20:49:14 +01:00
Zbigniew Jędrzejewski-Szmek
ff68472a20 core: add Unit.Markers property
The property is never set by systemd, only reset after a stop or restart or
reload. It may externally be set to mark the unit for a later restart/reload.

I wasn't sure whether to configure the property only for the types where this
makes sense (Service, Swap, etc). But Restart() method is defined on the unit,
and also having this always under the same property name is more convenient.
2021-02-15 20:49:14 +01:00
Lennart Poettering
458ab40f35
Merge pull request #18580 from keszybz/signal-list
Add systemctl --signal=list
2021-02-15 14:37:03 +01:00
Zbigniew Jędrzejewski-Szmek
97ab9dfc0d systemctl,loginctl,machinectl: add --signal=list
This lists numerical signal values:
$ systemctl --signal list
SIGNAL NAME
1      SIGHUP
2      SIGINT
3      SIGQUIT
...
62     SIGRTMIN+28
63     SIGRTMIN+29
64     SIGRTMIN+30

This is useful when trying to kill e.g. systemd with a specific signal number
using kill. kill doesn't accept our fancy signal names like RTMIN+4, so one
would have to calculate that value somehow. Doing
  systemctl --signal list | grep -F RTMIN+4
is a nice way of doing that.
2021-02-15 08:50:40 +01:00
Lennart Poettering
d711322c13 resolvectl: add support for various new flags 2021-02-15 10:47:41 +09:00
Zbigniew Jędrzejewski-Szmek
86beb21302 systemctl,loginctl,machinectl: use a shared helper for arg_signal
I seems frivolous to yet another two -util.[ch] files, but the helper
should be in shared/ and it doesn't seem to fit anywhere else.
2021-02-14 15:59:09 +01:00
Zbigniew Jędrzejewski-Szmek
b3c57df0f5
Merge pull request #18401 from anitazha/oomdxattr
oomd: implement avoid/omit support for cgroups
2021-02-13 10:00:31 +01:00
Anita Zhang
d8a4d64bc3 man: document ManagedOOMPreference= 2021-02-12 12:46:22 -08:00
Zbigniew Jędrzejewski-Szmek
63ab06c4d2 sd-bus: extend sd_bus_message_read_strv() to paths and signatures
It's rather convenient to be able to read all three types with this function.
Strictly speaking this change is not fully compatible, in case someone was
relying on sd_bus_message_read_strv() returning an error for anything except
"as", but I hope nobody was doing that.
2021-02-12 11:36:24 +01:00
Vinnie Magro
f963f8953d networkd: add UseFQDN option for DHCPv6
Similar to DHCPv4's UseHostname option, add a UseFQDN config option in
[DHCPv6] to set the system's transient hostname if the FQDN option is
set in the DHCPv6 response from the server.
2021-02-11 13:30:04 +09:00
Luca Boccassi
e26fe5f911 portable: add 'reattach' verb and DBUS interface
Add 'reattach' verb to portablectl, and corresponding DBUS interface
to systemd-portabled.
Takes the same parameters as 'attach', but it will do a 'detach' (and
it will refuse to proceed if it cannot be done) first, matching on
the unversioned prefix of the new image. Eg:

portablectl reattach /tmp/foo_2.raw

will cause foo_1.raw to be detached, and foo_2.raw to be attached.

The key difference with a manual 'detach old' plus 'attach new' is that
the running units are not disturbed until after the attach completed,
and if --now is passed they are then restarted.
A 'detach' is not allowed normally if the units are running.

By using a restart-after-deploy method, 'reattach' allows for minimal
interruption of service and also for features that only work on restart
(eg: file descriptor store) to work as intended.

The DBUS interface returns two lists: first the removals from the detach
that were not immediately re-added in the attach, so that the caller
can stop the relevant units, and then the list of additions that are
either new or updates, so that the caller can restart/enable the
relevant units. portablectl already implements this with the existing
--now/--enable switches.
2021-02-10 19:07:36 +00:00
Lennart Poettering
bbd86b72f1 man: document new coredumpctl features 2021-02-10 12:22:03 +01:00
Zbigniew Jędrzejewski-Szmek
ad22e7cf5c
Merge pull request #18375 from yuwata/cli-tools-also-read-kernel-command-line
tree-wide: make CLI tools also read kernel command line when run as service
2021-02-08 11:45:42 +01:00
Julia Cartwright
afe6a9c48e man: fix misspellings of "NameSeviceSwitch"
Fixup NameSeviceSwitch -> NameServiceSwitch spelling error in
documentation.

Found through inspection of documentation.
2021-02-06 00:00:44 +00:00
Lennart Poettering
cb3363ef7a
Merge pull request #18318 from yuwata/network-route-table-name
network: RouteTable= improvements
2021-02-05 18:08:56 +01:00
Lennart Poettering
ca9fab8896 Revert "resolvectl: Add show-multicast verb to show discovered LLMNR/mDNS hosts" 2021-02-05 09:23:05 +09:00
Yu Watanabe
7bac23e8af man: fix typo 2021-02-04 19:17:50 +01:00
Zbigniew Jędrzejewski-Szmek
a7a1887869 man: reword the description of "main conf file"
While not really "wrong", the text we had could use a little editing.

Fixes #18458.
2021-02-04 14:32:28 +01:00
Zbigniew Jędrzejewski-Szmek
3d0112878f
Merge pull request #18444 from anitazha/proprename
oom: parse properties with 1/10000 precision instead of 1/100
2021-02-04 12:53:10 +01:00
Zbigniew Jędrzejewski-Szmek
5623600c6e
Merge pull request #18355 from DaanDeMeyer/resolved-discover
resolvectl: Add show-multicast verb to show discovered LLMNR/mDNS hosts
2021-02-04 10:37:21 +01:00
Yu Watanabe
face9fcc16 network,udev: move TransmitQueues=/ReceiveQueues= from .network to .link
As the settings are mostly hardware setup, and merely see from network
layer.

See also discussions in
https://github.com/systemd/systemd/pull/18170#issuecomment-758807497
https://github.com/orgs/systemd/teams/systemd/discussions/1
2021-02-03 14:44:51 +09:00
Yu Watanabe
1f8dc96c06 udev: rename TxQueueLength= -> TransmitQueueLength=
As we usually (unfortunately not always though) do not use abbreviations.

Tx may be standard abbreviation, but we already have e.g.
TransmitChecksumOffload=. So, let's use Transmit instead of Tx.

Follow-up for ef4a91a7e8.
2021-02-03 14:43:49 +09:00
Yu Watanabe
310eff7274 network: make RouteTable= setting can take multiple name:number pairs in a line
Follow-up for c038ce4606.
2021-02-03 14:32:26 +09:00
Anita Zhang
0a9f93443b oom: rework *MemoryPressureLimit= properties to have 1/10000 precision
Requested in
https://github.com/systemd/systemd/pull/15206#discussion_r505506657,
preserve the full granularity for memory pressure limits (permyriad)
instead of capping out at percent.
2021-02-02 17:52:48 -08:00
Zbigniew Jędrzejewski-Szmek
7e215af765 man: move content from the wiki to systemd.preset(5)
The wiki was slightly stale, and almost all the information there
was already present in the man page. I moved the remaing part (discussion)
into the man page and adjusted all links to point to the man page instead.

daemon(7) has a some examples of packaging scriptlets… I don't think it fits
there very well. Most likely they should be moved to systemd.preset(5) or maybe
even removed, but I'm leaving that for later.
2021-02-02 14:20:23 +01:00
Deepak Rawat
8885fed4e3 logind: Introduce RebootWithFlags and others
Add new systemd-logind WithFlags version for Reboot and others. These
methods add a unit64 parameter, with which can send additional control flags.
2021-02-02 11:55:16 +00:00
Yu Watanabe
dc4e2940e8 core: set $SYSTEMD_EXEC_PID= environment variable for executed commands
It may be useful to detect a command is directly executed by systemd
manager, or indirectly as a child of another process.
2021-02-01 01:13:44 +09:00
Daan De Meyer
ad612eba51 resolve: Add show-multicast verb
The show-multicast verb calls the GetMulticastHosts() D-Bus method
and displays all its results formatted into a table.
2021-01-31 10:14:40 +00:00
Pavel Hrdina
16455ee2b1 man: fix small issue in AllowedMemoryNodes description
It should not mention "CPU" but "NUMA nodes".
2021-01-30 18:19:17 +01:00
Daan De Meyer
69988fee43 resolve: Add GetMulticastHosts() D-Bus method
GetMulticastHosts() returns an array of hostnames/addresses discovered via
LLMNR or Multicast DNS. It does not trigger any discovery on its own.
Instead, it simply returns whatever is already in resolved's cache.
2021-01-30 13:51:41 +00:00
Einsler Lee
9c587d6618 man: make it clear how systemd calculate the DefaultTasksMax.
Actually, systemd takes the minimum of 
* a) the maximum tasks value the kernel allows on this architecture
* b) the cgroups pids_max attribute for the system
* c) the kernel's configured maximum PID value
to calculate the DefaultTasksMax. Here, kernel.thread-max should also be methioned.
2021-01-30 12:48:15 +01:00
Lennart Poettering
82446c66cc
Merge pull request #18399 from keszybz/man-proofreading
Various man page cleanups
2021-01-29 20:04:07 +01:00
Zbigniew Jędrzejewski-Szmek
1d3a473b4a man: use ellipses for ranges in range descriptions
… and in few other places ;)
2021-01-29 17:02:23 +01:00
Topi Miettinen
ddc155b2fd New directives NoExecPaths= ExecPaths=
Implement directives `NoExecPaths=` and `ExecPaths=` to control `MS_NOEXEC`
mount flag for the file system tree. This can be used to implement file system
W^X policies, and for example with allow-listing mode (NoExecPaths=/) a
compromised service would not be able to execute a shell, if that was not
explicitly allowed.

Example:
[Service]
NoExecPaths=/
ExecPaths=/usr/bin/daemon /usr/lib64 /usr/lib

Closes: #17942.
2021-01-29 12:40:52 +00:00
Zbigniew Jędrzejewski-Szmek
75909cc7e4 man: various typos and other small issues
Fixes #18397.
2021-01-29 08:42:39 +01:00
Zbigniew Jędrzejewski-Szmek
d13f2617c9 man: rework description of --timestamp
Existing markup would be rendered improperly by groff. For #18397.
2021-01-28 20:43:42 +01:00
Zbigniew Jędrzejewski-Szmek
cf3ce0545c docs: add missing plural in title reference 2021-01-28 20:43:09 +01:00
Zbigniew Jędrzejewski-Szmek
e3c368f63c meson: rename target to update-man-rules
Same justification as for update-dbus-docs.
2021-01-27 09:10:25 +01:00
Zbigniew Jędrzejewski-Szmek
4c890ad3cc meson: rename target to update-dbus-docs
Very old versions of meson did not include the subdirectory name in the
target name, so we started adding various "top-level" custom targets in
subdirectories. This was nice because the main meson.build file wasn't
as cluttered. But then meson started including the subdir name in the
target name. So let's move the definition to the root so we can have all
targets named uniformly.
2021-01-27 08:46:42 +01:00
Zbigniew Jędrzejewski-Szmek
172e8cf505
Merge pull request #18365 from DaanDeMeyer/update-man-rules-mkosi
Fix update-man-rules usage with mkosi
2021-01-25 14:05:56 +01:00
Daan De Meyer
eb83eb63b8 sd-bus: Add sd_bus_reply()
While sd-bus already provides sd_bus_call() for calling a method
from a complete bus message object, We don't have an equivalent
function for replying from a method with a complete bus message
object.

Currently, we use sd_bus_send(call->bus, m, NULL) instead. Let's
add a shorthand for this pattern and name it sd_bus_reply().
2021-01-25 12:31:17 +09:00
Daan De Meyer
44bc7f4fcf meson: Fix update-man-rules when the build dir is not a subdir of the project dir
Until now, update-man-rules assumed that the build directory was
a subdirectory of the project directory. When using mkosi, this is
not the case. We use find instead of git ls-files because git ls-files
does not seem to support outputting absolute paths.

Also, this makes update-man-rules a bit more user-friendly as new manpages
don't have to be added to the git staging area before they are processed by
update-man-rules.py.
2021-01-24 17:33:49 +00:00
Anita Zhang
408a3bbd76 oom: make swap a soft requirement 2021-01-24 01:59:03 -08:00
Anita Zhang
c20aa7b171 oom: make memory pressure duration configurable through oomd.conf 2021-01-24 01:59:03 -08:00
Jiehong
9ae5fed64e feature: display status with a different shape depending on the status (#17728) 2021-01-22 20:45:43 +01:00
Luca Boccassi
95457dc13c
Merge pull request #18302 from bluca/mount_image_runtime
systemctl/core: add DBUS method to mount images without service restart
2021-01-22 17:49:11 +00:00
Yu Watanabe
3e405f28f4
Merge pull request #16228 from ddstreet/administrative_state
Add ActivationPolicy= [Link] parameter
2021-01-22 12:11:29 +09:00
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
af47713952 pid1: add DBUS method to mount image inside a running service namespace
Follow the same pattern as the BindMount method.
2021-01-21 18:37:00 +00:00
Lennart Poettering
8d0d1a309e man: share a common explanation for --json= 2021-01-21 18:21:41 +01:00
Lennart Poettering
17547fb5cb dissect: almost port systemd-dissect to table_print_with_pager()
This doesn't actually port systemd-dissect to table_print_with_pager()
but at least rearranges things so that similar behaviour is exposed. The
reason it's not ported over 1:1 is that systemd-dissect actually adjusts
the JSON output of the table with additional info, and doesn't print the
table 1:1 as JSON.
2021-01-21 18:14:37 +01:00
Lennart Poettering
16a36b5616 sysext: port to table_print_with_pager()
This adds --no-legend as side-effect.
2021-01-21 18:14:21 +01:00
Lennart Poettering
896e678bea repart: port to table_print_with_pager()
This adds support for showing a pager, turning of the legend, like in
the other tools.
2021-01-21 18:14:21 +01:00
Dan Streetman
61135582e0 network: add ActivationPolicy= configuration parameter
This parameter allows configuring the activation policy for an interface,
meaning how it manages the interface's administrative state (IFF_UP flag).
The policy can be configured to bring the interface either up or down when
the interface is (re)configured, to always force the interface either up or
down, or to never change the interface administrative state.

If the interface is bound with BindCarrier=, its administrative state is
controlled by the interface(s) it's bound to, and this parameter is forced
to 'bound'.

This changes the default behavior of how systemd-networkd sets the IFF_UP
flag; previously, it was set up (if not already up) every time the
link_joined() function was called. Now, with the default ActivationPolicy=
setting of 'up', it will only set the IFF_UP flag once, the first time
link_joined() is called, during an interface's configuration; and on
the first link_joined() call each time the interface is reconfigured.

Fixes: #3031
Fixes: #17437
2021-01-21 11:49:43 -05:00
Yu Watanabe
33f7b61ca5
Merge pull request #18329 from poettering/notify-chroot
chroot/sd_notify() fixes
2021-01-21 13:16:59 +09:00
Lennart Poettering
09872a6e1a man: document how get logging to work in a RootDirectory=/RootImage= environment
Fixes: #18051
2021-01-20 22:39:33 +01:00
Lennart Poettering
301265ea10 man: document recent systemd-sysext interface changes 2021-01-20 17:50:23 +01:00
Susant Sahani
c038ce4606 network: add support to RoutingPolicyRule lookup table name 2021-01-19 16:37:46 +00:00
Florian Westphal
48ed276647 networkd: extend IPMasquerade to cover ipv6
Extend IPMasquerade to also cover ipv6.
For compatibility reasons with earlier releases IPMasquerade=yes
is identical to IPMasquerade=ipv4.

Use IPMasquerade=both to cover ipv6 as well as ipv4.

IPForward will now also enable ipv6 forwarding if IPMasquerade for ipv6 is enabled.
2021-01-19 16:38:53 +01:00
Lennart Poettering
656e5aa452
Merge pull request #18181 from poettering/sysext
systemd-sysext as a method of merging simple OS extensions into /usr and /opt
2021-01-19 16:02:58 +01:00
Zbigniew Jędrzejewski-Szmek
30927a2484 Allow control characters in environment variable values
So far, we would allow certain control characters (NL since
b4346b9a77, TAB since 6294aa76d8), but not others. Having
other control characters in environment variable *value* is expected and widely
used, for various prompts like $LESS, $LESS_TERMCAP_*, and other similar
variables. The typical environment exported by bash already contains a dozen or
so such variables, so programs need to handle them.

We handle then correctly too, for example in 'systemctl show-environment',
since 804ee07c13. But we would still disallow setting such variables
by the user, in unit file Environment= and in set-environment/import-environment
operations. This is unexpected and confusing and doesn't help with anything
because such variables are present in the environment through other means.

When printing such variables, 'show-environment' escapes all special
characters, so variables with control characters are plainly visible.
In other uses, e.g. 'cat -v' can be used in similar fashion. This would already
need to be done to suppress color codes starting with \[.

Note that we still forbid invalid utf-8 with this patch. (Control characters
are valid, since they are valid 7-bit ascii.) I'm not sure if we should do
that, but since people haven't been actually asking for invalid utf-8, and only
for control characters, and invalid utf-8 causes other issues, I think it's OK
to leave this unchanged.

Fixes #4446, https://gitlab.gnome.org/GNOME/gnome-session/-/issues/45.
2021-01-19 14:18:34 +01:00
Luca Boccassi
36b95d0440 man: mention SYSEXT_LEVEL in os-release(5) 2021-01-19 13:41:42 +01:00
Luca Boccassi
60bb6caaae sysext: use parse_extension_release and reject extension if not found 2021-01-19 13:41:42 +01:00
Lennart Poettering
7a87fb6119 man: add man page for systemd-sysext 2021-01-19 13:41:42 +01:00
Yu Watanabe
7e2757c42f
Merge pull request #18038 from yuwata/meson-split
meson: various cleanups
2021-01-19 12:22:34 +09:00
Yu Watanabe
4c6dd238b8
Merge pull request #18267 from lucaswerkmeister/truncate
Two StandardOutput=truncate:file improvements
2021-01-19 08:47:39 +09:00
Yu Watanabe
a0e150b2f4 meson: add missing license header 2021-01-19 07:06:32 +09:00
Lucas Werkmeister
e372584067 man: document effects of concurrent truncation
Co-authored-by: Lennart Poettering <lennart@poettering.net>
2021-01-18 21:59:19 +01: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
Luca Boccassi
94293d65cd MountAPIVFS: always mount a tmpfs on /run
We need a writable /run for most operations, but in case a read-only
RootImage (or similar) is used, by default there's no additional
tmpfs mount on /run. Change this behaviour and document it.
2021-01-18 17:24:05 +00:00
Yu Watanabe
f9ead1a2f4
Merge pull request #18230 from ssahani/macvlan-bcqueuelen
network: macvlan - add support to configure rx queue for broadcast / multicast
2021-01-17 20:05:22 +09:00
Lennart Poettering
3dc536e0c5
Merge pull request #17576 from gportay/veritysetup-add-support-for-dm-verity-flags
veritysetup: add support for veritytab
2021-01-17 11:18:25 +01:00
Susant Sahani
dca0a4e131 network: macvlan - add support to configure rx queue for broadcast/multicast 2021-01-17 08:39:28 +01:00
Yu Watanabe
38f3e0a58d tree-wide: fix typo 2021-01-17 16:20:27 +09:00
Adam Nielsen
e64652f70c man: clarify what network scopes are 2021-01-17 12:47:08 +09:00
Lucas Werkmeister
d15b1a6c22 man: document that truncate:file happens per command line 2021-01-15 20:22:29 +01:00
Gaël PORTAY
3ceb6913c7 man/systemd-veritysetup-generator: fix trailing space 2021-01-15 11:06:11 -05:00
Gaël PORTAY
08b04ec7e7 veritysetup-generator: add support for veritytab
This adds the support for veritytab.

The veritytab file contains at most five fields, the first four are
mandatory, the last one is optional:
 - The first field contains the name of the resulting verity volume; its
   block device is set up /dev/mapper/</filename>.
 - The second field contains a path to the underlying block data device,
   or a specification of a block device via UUID= followed by the UUID.
 - The third field contains a path to the underlying block hash device,
   or a specification of a block device via UUID= followed by the UUID.
 - The fourth field is the roothash in hexadecimal.
 - The fifth field, if present, is a comma-delimited list of options.
   The following options are recognized only: ignore-corruption,
   restart-on-corruption, panic-on-corruption, ignore-zero-blocks,
   check-at-most-once and root-hash-signature. The others options will
   be implemented later.

Also, this adds support for the new kernel verity command line boolean
option "veritytab" which enables the read for veritytab, and the new
environment variable SYSTEMD_VERITYTAB which sets the path to the file
veritytab to read.
2021-01-15 11:06:11 -05:00
Zbigniew Jędrzejewski-Szmek
8b273a478d man: s/dash/mdash/ 2021-01-15 10:33:28 +01:00
Lucas Werkmeister
8d7dab1fda Add truncate: to StandardOutput= etc.
This adds the ability to specify truncate:PATH for StandardOutput= and
StandardError=, similar to the existing append:PATH. The code is mostly
copied from the related append: code. Fixes #8983.
2021-01-15 09:54:50 +01:00
Gaël PORTAY
0141102f10 veritysetup-generator: add support for verity root options
This adds support for a new kernel root verity command line option
"verity_root_options=" which controls the behaviour of dm-verity by
forwarding options directly to systemd-veritysetup.

See `veritysetup(8)` for more details.
2021-01-14 19:41:41 -05:00
Lennart Poettering
ce0079d75e
Merge pull request #18227 from yuwata/network-dhcp6-pd-manage-temporary-address
network: introduce ManageTemporaryAddress= setting in [DHCPv6PrefixDelegation] section
2021-01-13 21:52:44 +01:00
Yu Watanabe
cb2ae9f8b9
Merge pull request #18170 from OnkelUlla/udev_introduce_TxQueueLen=_setting
udev: introduce TxQueueLength= setting
2021-01-14 00:19:29 +09:00
Yu Watanabe
fec1b650ad network: introduce ManageTemporaryAddress= setting in [DHCPv6PrefixDelegation] section
The setting is enabled by default, as NDisc also enabled the flag by
default.

Closes #18208.
2021-01-14 00:17:05 +09: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
Ulrich Ölmann
ef4a91a7e8 udev: introduce TxQueueLength= setting
Enable udev to set the transmit queue length of a device via a new directive to
be used in link files. The kernel stores this parameter as an unsigned 32 bit
integer. As typical values currently range in the order of 10 to a few 10,000
packets reduce the domain of valid values for this directive to 0..4294967294
and take the excluded 4294967295 == UINT32_MAX to indicate that the directive
is unset.
2021-01-13 06:41:06 +01:00
Lennart Poettering
29271da500 tmpfiles: document that the "argument" field doesn't do quotes
This adjust the documentation to match the code, addressing #17740.

I actually think that not making the "argument" field accept quotes was
a mistake, but I also understand why this choice was made. Given that we
shipped this forever like this though I don't think it's worth changing
the behaviour now. Supporting quotes for this is not that important I
guess. Hence document the current behaviour.

Fixes: #17740
2021-01-12 22:00:35 +01:00
Yu Watanabe
048be097d2
Merge pull request #18157 from ssahani/vlan-qos
network: Allow to configure VLan egress qos maps
2021-01-13 05:42:53 +09:00
Yu Watanabe
7c5869530c
Merge pull request #17628 from ssahani/network-gso
udev: Add support to configure Generic Segment Offload
2021-01-13 05:42:23 +09:00
Susant Sahani
1e270127de link: Add support to configure Generic Segment Offload 2021-01-12 15:19:23 +01:00
Lennart Poettering
b433300e4c meson: catch up with 'update-man-rules' 2021-01-12 15:00:38 +01:00
Susant Sahani
ea07086285 network: Allow to configure VLan egress qos maps 2021-01-12 14:31:03 +01:00
Susant Sahani
0d9b8913e2 network: Allow to configure VLan egress qos maps 2021-01-12 14:30:56 +01:00
Yu Watanabe
1536b7b2d0 network: introduce new UseAddress= setting in [DHCPv6] section
If it is disabled, then the addresses provided by the DHCPv6 server will
be ignored.

Closes #18203.
2021-01-12 14:19:03 +09:00
Zach Smith
ae463e4ef2 systemd-sleep: Set SYSTEMD_SLEEP_ACTION for systemd-sleep hooks.
When suspend-then-hibernate is called, hooks have no ability to determine which
stage of the request is being handled; they only see 'pre' and 'post' with the
verb 'suspend-then-hibernate'. This change introduces an environment variable
called SYSTEMD_SLEEP_ACTION that contains the name of the action that is
processing: 'suspend', 'hibernate', 'hybrid-sleep', or
'suspend-after-failed-hibernate'.
2021-01-09 18:11:01 +09:00
Yu Watanabe
83f0ff1eda
Merge pull request #18137 from keszybz/deprecate-blanket-import-environment
Deprecate blanket import-environment
2021-01-09 09:24:16 +09:00
Yu Watanabe
66bf4617b1
Merge pull request #18169 from OnkelUlla/can_bus_error_reporting
network: can: add support for bus error reporting
2021-01-09 09:21:54 +09:00
Ulrich Ölmann
77b674049b network: can: add support for bus error reporting
Enhance systemd-networkd to be able to control a CAN device's berr-reporting
flag via the new boolean directive BusErrorReporting= to be used in network
files.
2021-01-08 20:23:12 +01:00
Zbigniew Jędrzejewski-Szmek
32854f7044 systemctl: deprecate blanket import-environment
Importing the full environment is convenient, but it doesn't work too well in
practice, because we get a metric ton of shell-specific crap that should never
end up in the global environment block:

$ systemctl --user show-environment
...
SHELL=/bin/zsh
AUTOJUMP_ERROR_PATH=/home/zbyszek/.local/share/autojump/errors.log
AUTOJUMP_SOURCED=1
CONDA_SHLVL=0
CVS_RSH=ssh
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DESKTOP_SESSION=gnome
DISPLAY=:0
FPATH=/usr/share/Modules/init/zsh-functions:/usr/local/share/zsh/site-functions:/usr/share/zsh/site-functions:/usr/share/zsh/5.8/functions
GDMSESSION=gnome
GDM_LANG=en_US.UTF-8
GNOME_SETUP_DISPLAY=:1
GUESTFISH_INIT=$'\\e[1;34m'
GUESTFISH_OUTPUT=$'\\e[0m'
GUESTFISH_PS1=$'\\[\\e[1;32m\\]><fs>\\[\\e[0;31m\\] '
GUESTFISH_RESTORE=$'\\e[0m'
HISTCONTROL=ignoredups
HISTSIZE=1000
LOADEDMODULES=
OLDPWD=/home/zbyszek
PWD=/home/zbyszek
QTDIR=/usr/lib64/qt-3.3
QTINC=/usr/lib64/qt-3.3/include
QTLIB=/usr/lib64/qt-3.3/lib
QT_IM_MODULE=ibus
SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0
SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/2612,unix/unix:/tmp/.ICE-unix/2612
SHLVL=0
STEAM_FRAME_FORCE_CLOSE=1
TERM=xterm-256color
USERNAME=zbyszek
WISECONFIGDIR=/usr/share/wise2/
...

Plenty of shell-specific and terminal-specific stuff that have no global
significance.

Let's start warning when this is used to push people towards importing only
specific variables.

Putative NEWS entry:
  * systemctl import-environment will now emit a warning when called without
    any arguments (i.e. to import the full environment block of the called
    program). This command will usually be invoked from a shell, which means
    that it'll inherit a bunch of variables which are specific to that shell,
    and usually to the tty the shell is connected to, and don't have any
    meaning in the global context of the system or user service manager.
    Instead, only specific variables should be imported into the manager
    environment block.

    Similarly, programs which update the manager environment block by directly
    calling the D-Bus API of the manager, should also push specific variables,
    and not the full inherited environment.
2021-01-08 20:01:40 +01:00
Zbigniew Jędrzejewski-Szmek
82651d5b6b man: improve description of environment block creation
This adds a general description of "philosphy" of keeping the environemnt
block small and hints about systemd-run -P env.

The list of generated variables is split out to a subsection. Viewing
the patch with ignoring whitespace changes is recommended.

We don't ignore invalid assignments (except in import-environment to some
extent), previous description was wrong.

For https://bugzilla.redhat.com/show_bug.cgi?id=1912046#c17.
2021-01-08 20:01:40 +01:00
Susant Sahani
007cac09a2 network: route - add support to configure tcp advmss 2021-01-08 14:06:13 +00:00
AJ Jordan
c6ef002b80 man: clarify that coredumps are gc'd after 3 days 2021-01-07 16:18:29 +01:00
Susant Sahani
0a9fb9bad8 network: Allow to set device's receive queues and transmit queues 2021-01-05 12:46:28 +09:00
Lennart Poettering
c024f320ff man: use 'weak' and 'strong' for explaining difference between Wants= + Requires=
A minor tweak, that hopefully makes things a bit clearer, given that we
previously used "requirement dependency" when referring to Wants=, which
might be confusing given that we have Requires=
2021-01-04 16:48:51 +01:00
Darren Ng
63d9fe0f6d fix typo 2021-01-04 11:01:17 +00:00
Lucas Werkmeister
a1de7d01ff man: systemd-sysusers does not create home dir
Document that systemd-sysusers doesn’t create the specified home
directory, and point to systemd-tmpfiles as the service that can create
the home directory instead. (systemd-tmpfiles-setup.service is ordered
After=systemd-sysusers.service, so by the time systemd-tmpfiles would
create the home directory, sysusers would have created the owning user
already, and it should all work out.)
2021-01-03 22:51:07 +01:00
Gaël PORTAY
0215f04a7e man: fix path reference to unit file
The unit files are located at path /usr/lib/systemd/system.

This fixes the path reference to the unit file by adding the missing
path component system.
2020-12-31 11:43:44 +00:00
Lennart Poettering
57b3b8f48c man: apply @Minoru's suggestions from code review
Co-authored-by: Alexander Batischev <eual.jp@gmail.com>
2020-12-28 10:53:20 +01:00
Lennart Poettering
b149d230ea man: extend time-{set,sync}.target + systemd-timesyncd/wait-sync docs
Let's link the three man pages together more tightly and explain what
the two targets are about, emphasizing local/quick/reliable/approximate
vs remote/slow/unreliable/accurate synchronization.

Follow-up for: 1431b2f701 fe934b42e4
2020-12-28 10:52:33 +01:00
Yu Watanabe
75d2641190 network: introduce RouterAllowList= and RouterDenyList= in [IPv6AcceptRA] 2020-12-24 17:16:15 +09:00
Susant Sahani
de6b6ff84c networkd: add support for prefix allow-list and route allow-list 2020-12-24 17:16:13 +09:00
Yu Watanabe
3f0af4a5f9 network: rename DenyList= -> PrefixDenyList= 2020-12-24 17:15:44 +09:00
Jonathan G. Underwood
227acf0009 cryptsetup: add support for workqueue options
This commit adds support for disabling the read and write
workqueues with the new crypttab options no-read-workqueue
and no-write-workqueue. These correspond to the cryptsetup
options --perf-no_read_workqueue and --perf-no_write_workqueue
respectively.
2020-12-23 11:07:48 +00:00
Dmitry Borodaenko
68709a636c man/systemd-nspawn: document hashing machine name for uid base
Explicitly document the behavior introduced in #7437: when picking a new
UID shift base with "-U", a hash of the machine name will be tried
before falling back to fully random UID base candidates.
2020-12-23 10:18:03 +00:00