Commit Graph

3995 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 54fcb6192c core: define "exit" and "exit-force" actions for user units and only accept that
We would accept e.g. FailureAction=reboot-force in user units and then do an
exit in the user manager. Let's be stricter, and define "exit"/"exit-force" as
the only supported actions in user units.

v2:
- rename 'exit' to 'exit-force' and add new 'exit'
- add test for the parsing function
2018-10-17 19:31:49 +02:00
Zbigniew Jędrzejewski-Szmek 454dd6ce7a man: move description of *Action= modes to FailureAction=/SuccessAction=
FailureAction=/SuccessAction= were added later then StartLimitAction=, so it
was easiest to refer to the existing description. But those two settings are
somewhat simpler (they just execute the action unconditionally) while
StartLimitAction= has additional timing and burst parameters, and they are
about to take on a more prominent role, so let's move the description of
allowed values.
2018-10-17 19:28:18 +02:00
Lennart Poettering 964c4eda5b man: also use "yes"/"no" rather than "true"/"false" in man pages
We usually use yes/no in all our unit files, do the same in the man
pages.

Triggered by:

https://github.com/systemd/systemd/pull/9824#issuecomment-420729987
2018-10-13 12:59:29 +02:00
Lennart Poettering 9afe9efb93 logind: optionally, keep the user@.service instance for eached logged in user around for a while
This should speed up rapid logout/login cycles a bit.

By default this timeout is now set to 10s.

Fixes: #8410
Replaces: #4434
2018-10-13 12:59:29 +02:00
Lennart Poettering 74fb9617a8 man: add missing space 2018-10-13 12:59:29 +02:00
Lennart Poettering 190128e407 sd-bus: add new API call sd_bus_error_move()
This new call move an sd_bus_error into another one.
2018-10-13 12:59:29 +02:00
Lucas Werkmeister d5bf4f9b8f man: systemctl: clarify that --lines=0 is allowed (#10375)
The term “positive” is often read to exclude 0 (though “strictly
positive” is sometimes used to clarify this), so let’s explicitly state
that --lines=0 is legal and completely disables journal output.

Motivated by an answer on StackExchange [1].

[1]: https://unix.stackexchange.com/a/475068/44049
2018-10-13 17:31:40 +09:00
Yu Watanabe 8837715ef2
Merge pull request #10371 from poettering/sd-event-man-fix
trivial sd-event man page fixes
2018-10-13 17:30:44 +09:00
Davide Cavalca b75f0c69b3 shared: add %g, %G specifiers for group / gid (#10368) 2018-10-13 17:26:48 +09:00
Lucas Werkmeister d3c05587ce man: fix <manvolnum> of epoll_ctl(2) 2018-10-12 13:46:11 +02:00
Lennart Poettering 8274a30d0e man: add missing references to sd_event_add_inotify()
These man pages list references to the various sd_event_add_xyz() calls
at the bottom, but sd_event_add_inotify() was never added there.

Moreover, some list references to sd_event_add_post() and
sd_event_add_exit() even though these have shared man pages with
sd_event_add_defer(), and given that the "SEE ALSO" section should
probably reference pages instead of functions let's drop this.

Then, let's always specify the sd_event_add_xyz() calls in the same
order.

Finally, in the sd_event_new(3) text explaining the basic logic,
actually mention sd_event_add_post() and sd_event_add_exit() as well, as
in that case we actually want to list functions, not man pages.
2018-10-12 12:26:29 +02:00
hellcp e7f7f19abc Add LOGO to os-release 2018-10-12 10:15:30 +02:00
Lennart Poettering 8e04444385 journalctl: port JSON output mode to new JSON API
Also, while we are at it, beef it up, by adding json-seq support (i.e.
https://tools.ietf.org/html/rfc7464). This is particularly useful in
conjunction with jq's --seq switch.
2018-10-11 17:25:27 +02:00
Lennart Poettering 9cebb234b1 busctl: add a --json= output mode
A new switch "-j" or "--json=" is added which transforms dbus
marshalling into json. This is extremely useful in combination with
tools such as "jq" to process bus calls further.
2018-10-11 14:07:38 +02:00
Lennart Poettering 960d4b29d7
Merge pull request #10334 from keszybz/nomempool
Use mempool only in progs linked to libsystemd-shared.so
2018-10-11 13:44:34 +02:00
Zbigniew Jędrzejewski-Szmek 6939fb9eb4 meson: update bug reference
https://github.com/mesonbuild/meson/issues/1644 was resolved in 0.42:
be4428005d,
but still no-go.
2018-10-11 10:55:41 +02:00
dana 3118a4cf17 man: clarify behaviour of RandomizedDelaySec= 2018-10-10 16:15:05 +02:00
Asbjørn Apeland ca92fe36e0 man: fix typo 2018-10-10 09:57:57 +02:00
Zbigniew Jędrzejewski-Szmek dd76367d3b
Merge pull request #10307 from poettering/portable-path
finishing touches to portable services, and let's move portablectl to /usr/bin to make it official
2018-10-09 14:58:22 +02:00
Franck Bui c6885f5f36 core: introduce systemd.early_core_pattern= kernel cmdline option
Until a core dump handler is installed by systemd-sysctl, the generation of
core dump for services is turned OFF which can make the debugging of the early
boot process harder especially since there's no easy way to restore the core
dump generation.

This patch introduces a new kernel command line option which specifies an
absolute path where the kernel should write the core dump file when an early
process crashes.

This will take effect until systemd-coredump (or any other handlers) takes
over.
2018-10-09 10:26:23 +02:00
Lennart Poettering bd2865caf6 bootctl: include boot entries discovered by the boot loader but not in $BOOT in the "list" output
Let's use the new LoaderEntries efi var for this, and show all entries
we couldn't find via the config snippets.
2018-10-08 21:40:44 +02:00
Lennart Poettering d88c96ffe5 bootctl: add new verbs for setting the default boot/oneshot entry
Fixes: #5739 #8574
2018-10-08 21:40:44 +02:00
Lennart Poettering 8cbb7d8783 efi: allow ESP validity checks to be turned off
let's add an env var for this, as this really shouldn't be a top-level
feature, as it turning off the validity checks certainly isn't
advisable.

Fixes: #4925
2018-10-08 21:40:44 +02:00
Lennart Poettering 4eb5636b6c man: various updates to the bootctl man page 2018-10-08 21:40:44 +02:00
Lennart Poettering dcb4fe7401 man: document the new --no-pager switch of bootctl
Also, let's move the --help and --version items to the end of the list.
2018-10-08 21:40:44 +02:00
Lennart Poettering 1634ebb54a
Merge pull request #10262 from keszybz/hibres-disable
Switches to disable hibernation and/or resuming
2018-10-08 21:39:54 +02:00
Lennart Poettering 787dfb82f5 portabled: generate a more useful error when invalid image types are attempted to be attached
Fixes: #10095
2018-10-08 18:49:45 +02:00
Lennart Poettering 2ace445da7 man: explain the two search paths in the SYNOPSIS with a header 2018-10-08 18:49:45 +02:00
Lennart Poettering 83f72cd65f man,docs: document the new unit file directory for attached images 2018-10-08 18:49:45 +02:00
Zbigniew Jędrzejewski-Szmek e8f1d00d69 shared/sleep-config: add switches to kill specific sleep modes
/etc/systemd/sleep.conf gains four new switches:
AllowSuspend=, AllowHibernation=, AllowSuspendThenHibernate=, AllowHybridSleep=.

Disabling specific modes was already possible by masking suspend.target,
hibernate.target, suspend-then-hibernate.target, or hybrid-sleep.target.
But this is not convenient for distributions, which want to set some defaults
based on what they want to support. Having those available as configuration
makes it easy to put a config file in /usr/lib/systemd/sleep.conf.d/ that
overrides the defaults and gives instructions how to undo that override.
2018-10-08 18:21:00 +02:00
Zbigniew Jędrzejewski-Szmek e83419d043 hib-res-generator: add "noresume"
This is an override parameter, to totally skip dehiberanation.
2018-10-08 16:06:16 +02:00
Yu Watanabe 8a89c5392d man: fix explanation about UID/GID field in tmpfiles.d(5)
Fixes #9495.
2018-10-05 19:06:10 +02:00
Alan Jenkins 923f910115 man/systemd.exec: MountFlags=shared behaviour was changed (fixed?)
The behaviour described *was* observed on Fedora 28
(systemd-238-9.git0e0aa59), with and without SELinux.  I don't actually
know why though!  It contradicts my understanding of the code, including an
explicit comment in the code.

Testing in a VM upgraded to v239-792-g1327f272d, this behaviour goes away.


Test case:

# /etc/systemd/system/mount-test.service
[Service]
MountFlags=shared
Type=oneshot
ExecStart=/usr/bin/ls -l /proc/1/ns/mnt /proc/self/ns/mnt
ExecStart=/usr/bin/grep ext4 /proc/self/mountinfo


Weird old behaviour: new mount namespace but / is fully shared.

lrwxrwxrwx. 1 root root 0 Sep 14 11:18 /proc/1/ns/mnt -> mnt:[4026531840]
lrwxrwxrwx. 1 root root 0 Sep 14 11:48 /proc/self/ns/mnt ->
mnt:[4026532851]

968 967 253:0 / / rw,relatime shared:1 - ext4 /dev/mapper/alan_dell_2016...


Current behaviour: / is not fully shared

lrwxrwxrwx. 1 root root 0 Sep 14 11:39 /proc/1/ns/mnt -> mnt:[4026531840]
lrwxrwxrwx. 1 root root 0 Sep 14 11:41 /proc/self/ns/mnt ->
mnt:[4026532329]

591 558 8:3 / / rw,relatime shared:313 master:1 - ext4 /dev/sda3 rw,secl...
2018-10-05 17:38:38 +02:00
Stephen Gallagher a3e0bba8a9 Add DOCUMENTATION_URL as a standard value for /etc/os-release
It is very useful for distributions to be able to set a primary
documentation URL in a standard location so that users and
applications on the system can identify it. For example, many
headless systems these days use the "Cockpit" admin console. It
would be ideal if we could specify this location directly in the
os-release file so that any application or service could have a
well-known location for retrieving this and displaying it
appropriately. Users could likewise examine /etc/os-release to
learn this location.

Related: https://github.com/cockpit-project/cockpit/issues/10198

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2018-10-04 21:29:18 +02:00
Zbigniew Jędrzejewski-Szmek e80ef269a1
Merge pull request #10255 from poettering/hide-new-id128
drop references to "journalctl --new-id128"
2018-10-02 17:54:36 +02:00
Lennart Poettering b9d016d684 tree-wide: drop all references to "journalctl --new-id128"
Let's advertise "systemd-id128 new" instead.
2018-10-02 16:43:54 +02:00
Lennart Poettering 19a073db9b journalctl: drop --new-id128 from help and man texts
Let's remove redundancy and not advertise "journalctl --new-id128"
anymore, now that we have "systemd-id128 new" in a proper tool.

This allows us to reduce the overly large journalctl command set a bit.

Note that this just removes the --help and man text, the call remains
available for compat reasons.
2018-10-02 16:42:30 +02:00
Zbigniew Jędrzejewski-Szmek adda90b03e man: add man page for systemd-id128 2018-10-02 15:15:10 +02:00
Zbigniew Jędrzejewski-Szmek 0d1d512f7f systemd-id128: a new tool to print machine/boot/invocation/app-specific ids
The raison d'etre for this program is printing machine-app-specific IDs. We
provide a library function for that, but not a convenient API. We can hardly
ask people to quickly hack their own C programs or call libsystemd through CFFI
in python or another scripting language if they just want to print an ID.

Verb 'new' was already available as 'journalctl --new-id128', but this makes
it more discoverable.

v2:
- rename binary to systemd-id128
- make --app-specific= into a switch that applies to boot-id and machine-id
2018-10-02 15:15:10 +02:00
Zbigniew Jędrzejewski-Szmek 65d410c7ca sd-id128: add sd_id128_get_boot_app_specific() 2018-10-02 15:15:10 +02:00
Jonas DOREL 6cc2b88275 man: add systemctl suspend-then-hibernate (#10194)
This commit tries to document the systemctl suspend-then-hibernate documentation in the systemctl(1) manpage.

Fixes #10192.
2018-09-28 15:56:48 +02:00
Susant Sahani 6cf0a20491 udev/net: add support for the equivalent of "ethtool advertise" to .link files
This work adds support for the equivalent of "ethtool advertise" to .link files?
http://lists.freedesktop.org/archives/systemd-devel/2015-April/030112.html
2018-09-26 22:21:42 +02:00
Anita Zhang c87700a133 Make Watchdog Signal Configurable
Allows configuring the watchdog signal (with a default of SIGABRT).
This allows an alternative to SIGABRT when coredumps are not desirable.

Appropriate references to SIGABRT or aborting were renamed to reflect
more liberal watchdog signals.

Closes #8658
2018-09-26 16:14:29 +02:00
William Douglas 6d7b543342 RFC tmpfiles: Allow configuration to ignore execution errors
This is an implementation that covers making errors encountered when writing
file content optionally fatal. If this is something that folks would want I'll
add handling of this for all the other directives. I'd appreciate suggestions
on how this might better be structured as well (use of a goto fail or such) as
I'm not super happy with the approach.
2018-09-25 23:30:30 +02:00
Lennart Poettering 2b5d05fdfe
Merge pull request #10088 from keszybz/man-systemctl-return
man: add a description of systemctl return codes
2018-09-25 12:35:36 +02:00
Lennart Poettering 7c428bb5d5
Merge pull request #10059 from yuwata/env-exec-directory
core: introduce $RUNTIME_DIRECTORY= or friends
2018-09-25 12:34:30 +02:00
Lennart Poettering a942661787 inhibit: use format-table to format systemd-inhibit --list
This changes the output a bit, as the previous multi-line output of each
inhibitor is changed to a single line, but it does unify the output look
with the one of our other tools. Moreover this adds proper sorting.
2018-09-24 19:21:00 +02:00
Patrik Flykt 125f20b4de networkd-network: Introduce DHCPv6 PD knob for RFC 7084 WPD-4
RFC 7084, WPD-4, requires Customer Edge end routers to behave
according to the following:

"WPD-4:  By default, the IPv6 CE router MUST initiate DHCPv6 prefix
           delegation when either the M or O flags are set to 1 in a
           received Router Advertisement (RA) message.  Behavior of the
           CE router to use DHCPv6 prefix delegation when the CE router
           has not received any RA or received an RA with the M and the
           O bits set to zero is out of scope for this document."

Since it cannot be automatically detected whether DHCPv6 is to be
operated as an CE end router or whether to initiate an Informational
exchange to obtain other useful network information via DHCPv6 when the
Router Advertisement 'O' bit is set, a 'ForceDHCPv6PDOtherInformation'
boolean network configuration option in the '[DHCP]' section of a is
introduced. Setting this option causes DHCPv6 to be started in stateful
mode, although only the 'O' bit is seen in the Router Advertisement.

When 'ForceDHCPv6PDOtherInformation' is set and the Router Advertisement
has only the Other information 'O' bit set, disable requests for IA_NA
addresses.

Fixes #9745.
2018-09-19 13:45:17 -06:00
Zbigniew Jędrzejewski-Szmek 4aabca0058 man: remove recommendation to pull in slices from slices.target
That recommendation is likely to cause more trouble and for pretty
much all end-user units is not useful. Let's recommend relying on
the implicit dependency instead.

Fixes #10015.
2018-09-14 16:39:47 +02:00
Zbigniew Jędrzejewski-Szmek 23a9ffb093 man: add a description of systemctl return codes
Fixes #10056.
2018-09-14 16:02:48 +02:00