Zbigniew Jędrzejewski-Szmek [Wed, 13 Sep 2017 20:11:03 +0000 (22:11 +0200)]
man: fix repeated use of "use" in a sentence
Lennart Poettering [Fri, 8 Sep 2017 13:38:40 +0000 (15:38 +0200)]
run: add new --pipe option for including "systemd-run" commands in shell pipelines
In this mode, we'll directly connect stdin/stdout/stderr of the invoked
service with whatever systemd-run itself is invoked on. This allows
inclusion of "systemd-run" commands in shell pipelines, as unlike
"--pty" this means EOF of stdin/stdout/stderr are propagated
independently.
If --pty and --pipe are combined systemd-run will automatically pick the
right choice for the context it is invoked in, i.e. --pty when invoked
on a TTY, and --pipe otherwise.
John Lin [Mon, 11 Sep 2017 08:35:51 +0000 (16:35 +0800)]
units: remove unnecessary Requires= and After= in system.slice (#6794)
Marcus Lundblad [Mon, 11 Sep 2017 07:56:57 +0000 (09:56 +0200)]
hwdb: Add ACCEL_MOUNT_MATRIX for the Lamina T-1016B.NORD 2-in-1 tablet (#6430)
Thomas Sailer [Mon, 11 Sep 2017 06:36:05 +0000 (08:36 +0200)]
accelerator mount matrix for Asus TP300LD (#6789)
Lennart Poettering [Sat, 9 Sep 2017 20:48:35 +0000 (22:48 +0200)]
systemctl: don't do ANSI underlining on TERM=linux (#6778)
The linux console apparently can't do underlining, hence let's not do it
on the console.
Also see: #6601
Zbigniew Jędrzejewski-Szmek [Sat, 9 Sep 2017 20:32:37 +0000 (22:32 +0200)]
Merge pull request #6780 from poettering/agent-message
Three minor fixes.
Lennart Poettering [Sat, 9 Sep 2017 20:31:09 +0000 (22:31 +0200)]
libudev: add missing errno initialization/error propagation (#6781)
In libudev (which es much older code than the rest of systemd), we
propagate errors in functions not returning an int, via (positive) errno
(i.e. libc-style), and as negative Exyz values in those returning an int
(much preferred, i.e. Linux kernel style). Let's fix up a few place,
where this was incorrectly done, or not done at all.
Fixes: #6613
Alan Jenkins [Sat, 9 Sep 2017 12:54:23 +0000 (13:54 +0100)]
man: update reference to definition of StartLimitAction (#6786)
The values for StartLimitAction are defined in `man systemd.unit`.
Don't send people to `man systemd.service` just to find they need to look
back in `man systemd.unit` again :).
0xAX [Fri, 8 Sep 2017 21:51:04 +0000 (03:51 +0600)]
kmod-setup: define has_virtio_rng() only in a case when HAVE_KMOD is enabled (#6784)
in other way we will get a warning message:
../src/core/kmod-setup.c:83:13: warning: ‘has_virtio_rng’ defined but
not used [-Wunused-function]
static bool has_virtio_rng(void) {
^~~~~~~~~~~~~~
Felipe Sateler [Fri, 8 Sep 2017 16:21:37 +0000 (13:21 -0300)]
sulogin-shell: switch from shell implementation to a C implementation (#6698)
Lennart Poettering [Fri, 8 Sep 2017 15:34:11 +0000 (17:34 +0200)]
efivars: don't crash when somebody wants to remove an efi variable
This corrects
b3c908b4a230c5cca0dcdd7e94d02ec54a298abf by allowing a
NULL value again for variable deletion.
Fixes: #6753
Lennart Poettering [Fri, 8 Sep 2017 15:29:55 +0000 (17:29 +0200)]
man: only document "systemd-mount --umount", never "--unmount"
Internally, we accept either, but let's stick to one of the spellings
for all docs.
Fixes: #6757
Lennart Poettering [Fri, 8 Sep 2017 15:24:57 +0000 (17:24 +0200)]
core: downgrade log message about inability to propagate cgroup release message
If dbus is already down during shutdown, we can't propagate the cgroup
release message anymore, but that's expected and nothing to warn about.
Hence let's downgrade the message from LOG_WARN to LOG_DEBUG.
Fixes: #6777
Lennart Poettering [Fri, 8 Sep 2017 14:16:29 +0000 (16:16 +0200)]
util-lib: wrap personality() to fix up broken glibc error handling (#6766)
glibc appears to propagate different errors in different ways, let's fix
this up, so that our own code doesn't get confused by this.
See #6752 + #6737 for details.
Fixes: #6755
Michal Sekletar [Fri, 8 Sep 2017 13:41:44 +0000 (15:41 +0200)]
manager: when reexecuting try to connect to bus only when dbus.service is around (#6773)
Trying to connect otherwise is pointless, because if socket isn't around
we won't connect. However, when dbus.socket is present we attempt to
connect. That attempt can't succeed because we are then supposed
to activate dbus.service as a response to connection from
us. This results in deadlock.
Fixes #6303
Kai-Heng Feng [Fri, 8 Sep 2017 12:25:44 +0000 (20:25 +0800)]
journalctl: honor --quiet when vacuuming (#6771)
'journalctl --vacuum-*' does not suppress output message with --quiet.
Let journal_directory_vacuum honors --quiet to fix the problem.
BugLink: https://bugs.launchpad.net/bugs/1692188
b1tninja [Fri, 8 Sep 2017 10:36:06 +0000 (03:36 -0700)]
Allow configuration of a bridge netdev's group_fwd_mask. (#6759)
Lennart Poettering [Fri, 8 Sep 2017 10:08:16 +0000 (12:08 +0200)]
Merge pull request #6770 from lucaswerkmeister/analyze-get-log
analyze: add get-log-level, get-log-target verbs
Djalal Harouni [Fri, 8 Sep 2017 06:38:00 +0000 (08:38 +0200)]
Merge pull request #6768 from fsateler/umount-message
Some better messages for systemd-mount --umount
Lucas Werkmeister [Thu, 7 Sep 2017 21:41:20 +0000 (23:41 +0200)]
analyze: add get-log-level, get-log-target verbs
They’re counterparts to the existing set-log-level and set-log-target
verbs, simply printing the current value to stdout. This makes it
slightly easier to temporarily change the log level and/or target and
then restore the old value(s).
Lucas Werkmeister [Thu, 7 Sep 2017 21:23:33 +0000 (23:23 +0200)]
shell-completion: add systemd-analyze set-log-target
The `systemd-analyze set-log-target` command was added in v227 (commit
2ca2a91cf1), but was missing from the shell completion specifications.
Felipe Sateler [Thu, 7 Sep 2017 19:16:19 +0000 (16:16 -0300)]
mount: always show the user-provided argument when umount can't be done
Otherwise it can be confusing if the path is not the same
Felipe Sateler [Thu, 7 Sep 2017 19:12:35 +0000 (16:12 -0300)]
mount: Add message when the target path does not exist
Fixes: #6760
Lennart Poettering [Thu, 7 Sep 2017 17:01:57 +0000 (19:01 +0200)]
Merge pull request #6616 from pfl/rdnss
networkd: RDNSS option for systemd-networkd prefix delegation
dmig [Fri, 1 Sep 2017 08:51:41 +0000 (15:51 +0700)]
hwdb: Add Cube i7 Stylus sensor rotation matrix (#6722)
Lennart Poettering [Thu, 7 Sep 2017 08:08:56 +0000 (10:08 +0200)]
Merge pull request #6436 from juga0/features/rfc7844
Features/rfc7844
John Lin [Thu, 7 Sep 2017 07:59:03 +0000 (15:59 +0800)]
man: fix systemd-analyze plot commands (#6761)
g0tar [Thu, 7 Sep 2017 07:58:12 +0000 (09:58 +0200)]
assemble multidevice btrfs volumes without external tools (#6607)
assemble multidevice btrfs volumes without external tools
This self-contained approach introduce very little overhead, unless
someone has a large number of devices composing many btrfs volumes,
in which case btrfs device scan would be faster. Still, having robust
implementation is a nice to have alternative for btrfs-progs.
Patrik Flykt [Wed, 6 Sep 2017 11:20:08 +0000 (14:20 +0300)]
man: Document prefix delegation in systemd.network
Add prefix delegation documentation covering IPv6PrefixDelegation=
setting in the Network section as well as all the parameters and
the IPv6PrefixDelegation and IPv6Prefix sections implemented so
far, including DNS= and DNSLifetimeSec= settings.
Patrik Flykt [Mon, 14 Aug 2017 09:53:13 +0000 (12:53 +0300)]
test-ndisc-ra: Update test with RDNSS option
Patrik Flykt [Mon, 14 Aug 2017 09:53:12 +0000 (12:53 +0300)]
networkd-radv: Set RDNSS information on Router Advertisement enabling
Patrik Flykt [Mon, 14 Aug 2017 09:53:11 +0000 (12:53 +0300)]
sd-radv: Add Router Advertisement DNS information
Add Router Advertisement Recursive DNS Server information as specified
in RFC 8106.
Patrik Flykt [Mon, 14 Aug 2017 09:53:10 +0000 (12:53 +0300)]
networkd: Parse DNS IPv6 information for Router Advertisement
Parse DNS IPv6 addresses and DNS server lifetime from .network files
so that they can be included in Router Advertisement RDNSS options.
RDNSS address and lifetime information is added to the
[IPv6PrefixDelegation] section according to the following syntax:
DNS=2001:db8::a:b 2001:db8::c:d
DNSLifetimeSec=1042
juga0 [Fri, 4 Aug 2017 01:27:51 +0000 (03:27 +0200)]
networkd: test DHCP client when Anonymize is true.
juga0 [Thu, 3 Aug 2017 17:42:06 +0000 (19:42 +0200)]
networkd: RFC7844, disable INIT-REBOOT state when
Anonymize is true.
juga0 [Fri, 4 Aug 2017 01:08:41 +0000 (03:08 +0200)]
networkd: RFC7844, do not set any other option
when Anonymize is enabled.
Use the Client variable to know whether it is enabled.
juga0 [Thu, 3 Aug 2017 17:19:51 +0000 (19:19 +0200)]
networkd: do not send more PRL options when Anonymize is true.
* check that Client has reserved memory for PRL
* do not send duplicated ROUTES option when Anonymize is true
juga0 [Thu, 3 Aug 2017 01:32:46 +0000 (03:32 +0200)]
networkd: set PRL default options depending on Anonymize.
Add also Client variable to know when Anonymize is true.
juga0 [Thu, 3 Aug 2017 01:23:39 +0000 (03:23 +0200)]
networkd: add PRL options to send when Anonymize is true
juga0 [Wed, 2 Aug 2017 23:10:51 +0000 (01:10 +0200)]
networkd: RFC7844, add network variable and function
to initialize Network variables when Anonymize is true.
* do not send hostname
* client identifier set to MAC
* do not send vendor class identifier
* do not send other PRL options
juga0 [Sat, 29 Jul 2017 23:10:40 +0000 (01:10 +0200)]
networkd: RFC7844, add configuration variable
to enable Anonymity Profiles and document it.
Charles Huber [Wed, 6 Sep 2017 15:00:57 +0000 (10:00 -0500)]
hwdb: Add mice (#6641)
* Dell MS111-T
* Dell MS116t
* Microsoft Comfort Mouse 4500
Susant Sahani [Wed, 6 Sep 2017 14:57:04 +0000 (14:57 +0000)]
networkd: Allow configure a specific link even if it has no carrier. (#6740)
This work allows to configure a specific link even if it has no carrier.
Closes #6645.
pEJipE [Wed, 6 Sep 2017 08:18:20 +0000 (10:18 +0200)]
Update version including Chuwi Hi13 (#6744)
juga0 [Wed, 6 Sep 2017 08:10:50 +0000 (08:10 +0000)]
networkd: send dhcp timezone option when UseTimezone is true (#6725)
Zbigniew Jędrzejewski-Szmek [Wed, 6 Sep 2017 07:39:14 +0000 (09:39 +0200)]
test-dns-domain: allow old and new libidn2 behaviour (#6749)
The behaviour changed to allow underscores. For now, lets just
accept both return values.
Fixes #6573.
Evgeny Vereshchagin [Wed, 6 Sep 2017 04:08:04 +0000 (07:08 +0300)]
tests: check the return value of personality when errno is not set (#6752)
The `personality` wrapper might not set errno, so in that case the return value
should be checked instead.
For details, see
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=
e0043e17dfc52fe1702746543127cb4a87232bcd.
Closes #6737.
Lennart Poettering [Tue, 5 Sep 2017 17:45:39 +0000 (19:45 +0200)]
Merge pull request #6748 from msekletar/console-container-getty-pre-after
units: order container and console getty units after getty-pre.target
Lennart Poettering [Tue, 5 Sep 2017 17:45:18 +0000 (19:45 +0200)]
Merge pull request #6747 from keszybz/cryptsetup-netdev
netdev option for crypttab
Lennart Poettering [Tue, 5 Sep 2017 14:31:26 +0000 (16:31 +0200)]
systemctl: make sure we properly turn off color at the end of each line of "list-unit-files" (#6688)
Let's simplify the code a bit, and make sure we always turn off color
and underlining again on each line, if we used it.
Fixes: #6684
Michal Sekletar [Tue, 5 Sep 2017 12:53:25 +0000 (14:53 +0200)]
units: order container and console getty units after getty-pre.target
juga0 [Tue, 5 Sep 2017 10:26:32 +0000 (10:26 +0000)]
networkd: send dhcp option NTP when UseNTP is true (#6726)
Tobias Hunger [Tue, 5 Sep 2017 10:25:56 +0000 (12:25 +0200)]
Mention mount.usr* in kernel-command-line man page (#6743)
Zbigniew Jędrzejewski-Szmek [Tue, 5 Sep 2017 09:30:33 +0000 (11:30 +0200)]
cryptsetup-generator: use remote-cryptsetup.target when _netdev is present
This allows such devices to depend on the network. Their startup will
be delayed similarly to network mount units.
Fixes #4642.
Zbigniew Jędrzejewski-Szmek [Tue, 5 Sep 2017 08:15:13 +0000 (10:15 +0200)]
units: add remote-cryptsetup.target and remote-cryptsetup-pre.target
The pair is similar to remote-fs.target and remote-fs-pre.target. Any
cryptsetup devices which require network shall be ordered after
remote-cryptsetup-pre.target and before remote-cryptsetup.target.
Zbigniew Jędrzejewski-Szmek [Tue, 5 Sep 2017 09:20:14 +0000 (11:20 +0200)]
man: add an explicit description of _netdev to systemd.mount(5)
It was mentioned in passing, but having it in the list of options is also
nice.
Zbigniew Jędrzejewski-Szmek [Tue, 5 Sep 2017 08:25:45 +0000 (10:25 +0200)]
man: order fields alphabetically in crypttab(5)
They already were mostly ordered alphabetically, but some disorder
snuck in.
Also, fix formatting. Some options were described using "--" prefixes, which
looks like the text was just copied from crypttab(8).
Zbigniew Jędrzejewski-Szmek [Tue, 5 Sep 2017 07:14:51 +0000 (09:14 +0200)]
units: order cryptsetup-pre.target before cryptsetup.target
Normally this happens automatically, but if it happened that both targets were
pulled in, even though there were no cryptsetup units, they could be started
in reverse order, which would be somewhat confusing. Add an explicit ordering
to avoid this potential issue.
Thomas Miller [Tue, 5 Sep 2017 05:18:20 +0000 (22:18 -0700)]
Add Razer Blade Stealth 2016 to hwdb (#6730)
Lennart Poettering [Mon, 4 Sep 2017 16:57:06 +0000 (18:57 +0200)]
Merge pull request #6741 from keszybz/template-loading-fix
Fix for mask/unmask operations on templates and multiple units
Lennart Poettering [Mon, 4 Sep 2017 16:52:14 +0000 (18:52 +0200)]
Merge pull request #5815 from benzea/master
rfkill: Delay writes until exit (#5768)
Zbigniew Jędrzejewski-Szmek [Mon, 4 Sep 2017 16:49:12 +0000 (19:49 +0300)]
build-sys: make nonnull warning non-fatal (#6742)
Seems to be some kind of confusion in gcc. Insteading of playing whack-a-mole and
adding work-arounds in code, let's adjust the compilation options instead.
Fixes #6119, replaces #6657.
Zbigniew Jędrzejewski-Szmek [Mon, 4 Sep 2017 14:12:17 +0000 (17:12 +0300)]
Merge pull request #6580 from poettering/nspawn-dm-deviceallow
add DM devices to DeviceAllow for systemd-nspawn@.service
Lennart Poettering [Mon, 4 Sep 2017 13:59:17 +0000 (15:59 +0200)]
Add handling for bind/unbind actions (#6720)
Newer kernels will emit uevents with "bind" and "unbind" actions. These
uevents will be issued when driver is bound to or unbound from a device.
"Bind" events are helpful when device requires a firmware to operate
properly, and driver is unable to create a child device before firmware
is properly loaded.
For some reason systemd validates actions and drops the ones it does not
know, instead of passing them on through as old udev did, so we need to
explicitly teach it about them.
Lennart Poettering [Mon, 4 Sep 2017 13:37:15 +0000 (15:37 +0200)]
Merge pull request #6721 from yuwata/mount-vfs
systemd-mount: allow to specify an arbitrary string for arg_mount_what when vfs is used
ettavolt [Mon, 4 Sep 2017 13:36:52 +0000 (16:36 +0300)]
6647 - use path_startswith("/dev") in cryptsetup (#6732)
For both key and partition paths.
Lennart Poettering [Mon, 4 Sep 2017 13:36:30 +0000 (15:36 +0200)]
Merge pull request #6735 from yuwata/multiple-capability-lines
core: update man and test to support multiple CapabilityBoundingSet= lines
Evgeny Vereshchagin [Mon, 4 Sep 2017 13:36:01 +0000 (16:36 +0300)]
core: serialize n-restarts and flush-n-restarts correctly (#6736)
This makes n-restarts and flush-n-restarts survive `systemctl daemon-[reload|rexec]`.
Lennart Poettering [Mon, 4 Sep 2017 13:35:35 +0000 (15:35 +0200)]
shared: add statx(2) to @file-system syscall filter list (#6738)
NeilBrown [Mon, 4 Sep 2017 13:35:07 +0000 (23:35 +1000)]
tmpfiles: silently ignore any path that passes through autofs (#6506)
If a path passes though an autofs filesystem, then accessing
the path might trigger and automount. As systemd-tmpfiles is run before
the network is up, and as automounts are often used for networked
filesystems, this can cause a deadlock.
So chase_symlinks is enhance to accept a new flag which tells it
to check for autofs, and return -EREMOTE if autofs is found.
tmpfiles is changed to check just before acting on a path so that it
can avoid autofs even if a symlink was created earlier by tmpfiles
that would send this path through an autofs.
This fixes a deadlock that happens when /home is listed in /etc/fstab as
x-systemd.automount for an NFS directory.
Jakub Wilk [Mon, 4 Sep 2017 13:25:59 +0000 (15:25 +0200)]
man: fix typos (#6739)
Yu Watanabe [Mon, 4 Sep 2017 07:25:22 +0000 (16:25 +0900)]
test: update test-unit-file
Follow-up for
c792ec2e3512a672881fc847ff432e26b641c9c9.
Yu Watanabe [Mon, 4 Sep 2017 07:20:47 +0000 (16:20 +0900)]
man: add examples for CapabilityBoundingSet=
Follow-up for
c792ec2e3512a672881fc847ff432e26b641c9c9.
iplayinsun [Mon, 4 Sep 2017 03:12:27 +0000 (12:12 +0900)]
core: merge the second CapabilityBoundingSet= lines by AND when it is prefixed with tilde (#6724)
If a unit file contains multiple CapabilityBoundingSet= or
AmbientCapabilities= lines, e.g.,
===
CapabilityBoundingSet=CAP_A CAP_B
CapabilityBoundingSet=~CAP_B CAP_C
===
before this commit, it results all capabilities except CAP_C are set to
CapabilityBoundingSet=, as each lines are always merged by OR.
This commit makes lines prefixed with ~ are merged by AND. So, for the
above example only CAP_A is set.
This makes easier to drop capabilities with drop-in config files.
Yu Watanabe [Mon, 4 Sep 2017 01:55:51 +0000 (10:55 +0900)]
systemd-mount: allow to specify an arbitrary string for arg_mount_what when vfs is used
Fixes #6591.
Jörg Thalheim [Sun, 3 Sep 2017 18:12:12 +0000 (19:12 +0100)]
NEWS: fix typo in v235 (#6731)
Zbigniew Jędrzejewski-Szmek [Sun, 3 Sep 2017 14:45:54 +0000 (17:45 +0300)]
systemctl: fix masking of template units
systemctl would try to load the properties of the unit, which is impossible
for template names, and the whole operation would fail. It seems that this
regression was introduced in
00c83b430020914499bebf22be6b258f518ae291.
Export the part of unit_find_paths() responsible for locating instance unit
fragments and reuse it from unit_exists() to fix the handling of template
units.
Fixes #6412.
Zbigniew Jędrzejewski-Szmek [Sat, 2 Sep 2017 14:37:08 +0000 (17:37 +0300)]
systemctl: check existence of all units, not just the first one
Benjamin Berg [Thu, 31 Aug 2017 15:36:37 +0000 (17:36 +0200)]
rfkill: Delay writes until exit (#5768)
On thinkpads there are two rfkill devices for bluetooth. The first is an
ACPI switch which powers down the USB dongle and the second one is the
USB dongle itself. So when userspace decides to enable rfkill on all
devices systemd would randomly save the soft block state of the USB
dongle. This later causes issue when re-enabling the devie as
systemd-rfkill would put the USB dongle into soft block state right
after the ACPI rfkill switch is unblocked by userspace.
The simple way to avoid this is to not store rfkill changes for devices
that disappear shortly after. That way only the "main" ACPI switch will
get stored and systemd-rfkill will not end up blocking the device right
after it is being added back again.
Yu Watanabe [Fri, 1 Sep 2017 08:03:01 +0000 (17:03 +0900)]
systemd-mount: fix that wrong argument is used for arg_mount_what
Yu Watanabe [Fri, 1 Sep 2017 07:38:41 +0000 (16:38 +0900)]
man: LockPersonality= takes a boolean argument (#6718)
Follow-up for
78e864e5b3cc11b72ae663f49f42f158cafbfedf.
Lennart Poettering [Fri, 1 Sep 2017 07:38:04 +0000 (09:38 +0200)]
Merge pull request #6715 from sourcejedi/kbrequest-jobmode2
Fix #6484 "4 or 5 out of 7 targets triggered by SIGRTMIN+X use the wrong job mode"
Lennart Poettering [Fri, 1 Sep 2017 00:09:32 +0000 (02:09 +0200)]
terminal: unify code for resetting kbd utf8 mode a bit (#6692)
We have the same code at two places, let's unify that at one place.
Follow-up for #6606
Lennart Poettering [Fri, 1 Sep 2017 00:04:27 +0000 (02:04 +0200)]
execute: minor ExecOutput handling beautification (#6711)
Let's clean up the checking for the various ExecOutput values a bit,
let's use IN_SET everywhere, and the same concepts for all three bools
we pass to dprintf().
Alan Jenkins [Fri, 1 Sep 2017 00:02:32 +0000 (01:02 +0100)]
systemctl: remove compiler warning (#6717)
913c1916 changed _ACTION_INVALID to negative, changing the enum to a
signed type. Take care to avoid comparing it with an unsigned type.
../src/systemctl/systemctl.c: In function ‘start_unit’:
../src/systemctl/systemctl.c:3107:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
assert(arg_action < ELEMENTSOF(action_table));
Lennart Poettering [Thu, 31 Aug 2017 16:51:25 +0000 (18:51 +0200)]
Merge pull request #6637 from sourcejedi/systemctl_cleanup
systemctl: improve readability of start_unit()
Susant Sahani [Thu, 31 Aug 2017 16:51:03 +0000 (16:51 +0000)]
networkd: Allow tunnels to be created without .network (#6701)
Now we don't support tunnels to be created without a .network file
that is we need a interface index.
This work allows tunnel to be created without a ifindex.
Closes #6695
Lennart Poettering [Thu, 31 Aug 2017 16:50:11 +0000 (18:50 +0200)]
Merge pull request #6708 from poettering/job-result-fixes
minor fixes, in particular to job state display in systemctl
Lennart Poettering [Thu, 31 Aug 2017 16:30:16 +0000 (18:30 +0200)]
update TODO
Benjamin Berg [Thu, 31 Aug 2017 15:34:08 +0000 (17:34 +0200)]
rfkill: Lookup device in determine_state_file
None of the callers actually need the device itself. So it makes sense
to do the lookup inside determine_state_file instead.
Alan Jenkins [Mon, 31 Jul 2017 16:36:58 +0000 (17:36 +0100)]
manager: fix job mode when signalled to shutdown etc
The irreversible job mode is required to ensure that shutdown is not
interrupted by the activation of a unit with a conflict.
We already used the correct job mode for `ctrl-alt-del.target`. But not
for `exit.target` (SIGINT of user manager). The SIGRT shutdown signals
also needed fixing.
Also change SIGRTMIN+0 to isolate default.target, instead of starting
it. The previous behaviour was documented. However there was no reason
given for it, nor can we provide one. The problem that isolate is too
aggressive anywhere outside of emergency.target (#2607) is orthogonal.
This feature is "accessible by different means and only really a safety
net"; it is confusing for it to differ from `systemctl default` without
explanation.
`AllowIsolate=yes` is retained on poweroff.target etc. for backwards
compatibility.
`sigpwr.target` is also an obvious candidate for linking to a shutdown
target. Unforunately it is also a possible hook for implementing some
logic like system V init did, reading `/etc/powerstatus`. If we switched
to starting `sigpwr.target` with REPLACE_IRREVERSIBLY, attempts to run
`systemctl shutdown` from it would fail, if they had not thought to set
`DefaultDependencies=no`. We had provided no examples for `sigpwr`, and
the whole idea is cruft to keep legacy people happy. For the moment, I
leave `sigpwr` alone, with no risk of disrupting anyone's
previously-working, half-working, or untested setup.
Fixes #6484. See also #6471
Alan Jenkins [Wed, 2 Aug 2017 15:19:22 +0000 (16:19 +0100)]
manager: remove fallback for user/exit.target
The comment here was misleading: the job can fail to enqueue for reasons
other than the target not existing.
The fallback caused an error to be logged, and dates back to when the
"user" directory was named "session". units/session/exit.target was added
later the same year.
This is consistent with the documentation (man systemd), and the handling
of similar signals. It's also consistent with `systemctl exit`, which is
what most people would expect.
Alan Jenkins [Mon, 31 Jul 2017 16:50:38 +0000 (17:50 +0100)]
man: dbus method Manager.Exit() does not start exit.target
It's like Manager.PowerOff(), which does not start poweroff.target.
Instead, the dbus methods are used for `systemctl --force exit`
or `systemctl --force poweroff`. They shut down the system without
processing individual unit's ExecStop or TimeoutStopSec.
Alan Jenkins [Tue, 1 Aug 2017 10:40:51 +0000 (11:40 +0100)]
units: do not install rescue.target for alt-↑
rescue.target does not work well for this. It is not meant to be started,
only isolated.
Fixes #6493
Lennart Poettering [Thu, 31 Aug 2017 08:25:48 +0000 (10:25 +0200)]
bus-unit-util: use STR_IN_SET() where appropriate
Lennart Poettering [Thu, 31 Aug 2017 08:25:23 +0000 (10:25 +0200)]
bus-unit-util: don't request result property from non-service units
Lennart Poettering [Thu, 31 Aug 2017 08:25:06 +0000 (10:25 +0200)]
tree-wide: use pid_is_valid() at more places
Harald Hoyer [Thu, 31 Aug 2017 13:33:33 +0000 (15:33 +0200)]
Load virtio_rng early in the game (#6710)
If true randomness is needed before udev is triggered, which would load
virtio_rng, reading /dev/random takes forever and the boot stalls for a
long time.
Alan Jenkins [Fri, 18 Aug 2017 12:18:09 +0000 (13:18 +0100)]
systemctl: improve readability of start_unit()
start_unit() is a little tangled. There's an easy part we can untangle,
then readers can concentrate on the more necessary complexity.
* Derive (method, action, mode) more clearly, as disjoint cases based on
the command. Don't rely on action_table[_ACTION_INVALID].target being
implicitly initialized to NULL.
verb_to_method() is now only used on one case, but not because I strongly
object to the implicit "StartUnit" cases. It's more a syntax problem.
I think the old code takes me longer to understand, because the call
comes just above a similar-looking call to verb_to_action(), but the
results of the two functions are used in different ways. It also helps
that the new code ends up having a more regular form, for the 4 different
cases.
These changes cost 6 extra lines.
* Add an assertion to confirm that we do not pass mode=NULL.