Commit Graph

279 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek aed5cb03db man: merge two sections into two subsections of one section
Those are very close subjects that are a good fit for one section.
2018-04-18 10:04:10 +02:00
Zbigniew Jędrzejewski-Szmek 75695fb798 man: describe unit templating explicitly
This patch is heavily based on the text suggested by
archenemies in #3791.

Fixes #3791.
2018-04-18 10:04:10 +02:00
Zbigniew Jędrzejewski-Szmek 2116134b04 man: briefly document Following=
Fixes #1914.
2018-04-18 09:16:17 +02:00
Zbigniew Jędrzejewski-Szmek 0f943ae4ea man: add a new page with a general description of common syntax
We have a common parser, but for the user it might be
completely unobvious that the same general rules apply
to all those files. Let's add a page about the basic syntax
so that the more specific pages don't have to repeat those
details.
2018-04-18 09:11:01 +02:00
Lennart Poettering 6c0a77953c man: document the new dash truncation drop-in directories 2018-04-13 11:34:48 +02:00
Zbigniew Jędrzejewski-Szmek 11a1589223 tree-wide: drop license boilerplate
Files which are installed as-is (any .service and other unit files, .conf
files, .policy files, etc), are left as is. My assumption is that SPDX
identifiers are not yet that well known, so it's better to retain the
extended header to avoid any doubt.

I also kept any copyright lines. We can probably remove them, but it'd nice to
obtain explicit acks from all involved authors before doing that.
2018-04-06 18:58:55 +02:00
Lennart Poettering f7a4bd9527 man: there's no point in referenceing systemd.unit(5) from itself (#8338) 2018-03-02 13:33:29 +01:00
Shuang Liu 9bfaf6ea1f man: add bhyve description for ConditionVirtualization=
The description in man is missing in #3840.
2018-02-22 15:29:34 +01:00
Shuang Liu 1fdf07f56c virt: detect QNX hypervisor
Detect QNX hypervisor based on the CPUID.

Fixes: #7239
2018-02-22 15:29:34 +01:00
Zbigniew Jędrzejewski-Szmek b82f27e7a3 man: document unit load paths
So far we didn't document control, transient, dbus config, or generator paths.
But those paths are visible to users, and they need to understand why systemd
loads units from those paths, and how the precedence hierarchy looks.
The whole thing is a bit messy, since the list of paths is quite long.
I made the tables a bit shorter by combining rows for the alternatives
where $XDG_* is set and the fallback.

In various places, tags are split like <element
  param="blah">
this. This is necessary to keep everyting in one logical XML line so that
docbook renders the table properly.

Replaces #8050.
2018-02-09 12:27:34 +01:00
Zbigniew Jędrzejewski-Szmek 22a705631d man: clarify that Requires stop propagation only applies to explit requests
Follow-up for e79eabdb1b. There was an
apparent contradiction:

  man/systemd.unit says for Requires=:

  Besides, with or without specifying After=, this unit will be deactivated
  if one of the other units get deactivated.

  Also, some unit types may deactivate on their own (for example, a service
  process may decide to exit cleanly, or a device may be unplugged by the
  user), which is not propagated to units having a Requires= dependency.

Fixes #7870.
2018-01-20 10:45:02 +11:00
Lennart Poettering 68c58c67b5 condition: extend ConditionKernelVersion= with relative version checks
Now that we have str_verscmp() in our source tree anyway, let's make it
generic and reuse it for ConditionKernelVersion=.
2017-12-26 17:43:29 +01:00
Zbigniew Jędrzejewski-Szmek 871c6d54e4 Add note about kernel version unportability 2017-12-26 17:39:44 +01:00
Lennart Poettering 5022f08a23 core,udev,networkd: add ConditionKernelVersion=
This adds a simple condition/assert/match to the service manager, to
udev's .link handling and to networkd, for matching the kernel version
string.

In this version we only do fnmatch() based globbing, but we might want
to extend that to version comparisons later on, if we like, by slightly
extending the syntax with ">=", "<=", ">", "<" and "==" expressions.
2017-12-26 17:39:44 +01:00
Chris Down e16647c39d condition: Create AssertControlGroupController (#7630)
Up until now, the behaviour in systemd has (mostly) been to silently
ignore failures to action unit directives that refer to an unavailble
controller. The addition of AssertControlGroupController and its
conditional counterpart allow explicit specification of the desired
behaviour when such a situation occurs.

As for how this can happen, it is possible that a particular controller
is not available in the cgroup hierarchy. One possible reason for this
is that, in the running kernel, the controller simply doesn't exist --
for example, the CPU controller in cgroup v2 has only recently been
merged and was out of tree until then. Another possibility is that the
controller exists, but has been forcibly disabled by `cgroup_disable=`
on the kernel command line.

In future this will also support whatever comes out of issue #7624,
`DefaultXAccounting=never`, or similar.
2017-12-18 08:53:29 +01:00
Ken (Bitsko) MacLeod bd2538b50b man: Clarify when OnFailure= activates after restarts (#7646) 2017-12-15 11:10:41 +01:00
Daniel Black afbc75e686 man: systemd.unit: move note about clearing lists (#7621)
This is mainly for drop-in files.
2017-12-14 13:51:23 +09:00
Zbigniew Jędrzejewski-Szmek 5a15caf4b5 man: normalize indentation in systemd.unit.xml 2017-12-08 15:36:15 +01:00
Zbigniew Jędrzejewski-Szmek 2bf9250617 man: add a table of setting inverses
It would be nicer to use <footnote> to place the notes directly in the table,
but docbook renders this improperly.

v2:
- also add "RequiredBy=" to the notes section
- remove duplicated paragraph
v3:
- clarify the description
- drop References/ReferenceBy which are only shown in systemd-analyze dump
2017-12-08 15:36:15 +01:00
Zbigniew Jędrzejewski-Szmek b292066890 man: mention BoundsBy=, ConsistsOf=, RequisiteOf=
Fixes #7043.
2017-12-07 09:47:03 +01:00
Zbigniew Jędrzejewski-Szmek 0deb073a66 man: improve formatting in systemd.unit.xml 2017-12-06 10:30:26 +01:00
Zbigniew Jędrzejewski-Szmek 751223fecf Fail on unknown (alphanumerical) specifiers
The code intentionally ignored unknown specifiers, treating them as text. This
needs to change because otherwise we can never add a new specifier in a backwards
compatible way. So just treat an unknown (potential) specifier as an error.

In principle this is a break of backwards compatibility, but the previous
behaviour was pretty much useless, since the expanded value could change every
time we add new specifiers, which we do all the time.

As a compromise for backwards compatibility, only fail on alphanumerical
characters. This should cover the most cases where an unescaped percent
character is used, like size=5% and such, which behave the same as before with
this patch. OTOH, this means that we will not be able to use non-alphanumerical
specifiers without breaking backwards compatibility again. I think that's an
acceptable compromise.

v2:
- add NEWS entry

v3:
- only fail on alphanumerical
2017-12-06 10:17:37 +01:00
Lennart Poettering e7dfbb4e74 core: introduce SuccessAction= as unit file property
SuccessAction= is similar to FailureAction= but declares what to do on
success of a unit, rather than on failure. This is useful for running
commands in qemu/nspawn images, that shall power down on completion. We
frequently see "ExecStopPost=/usr/bin/systemctl poweroff" or so in unit
files like this. Offer a simple, more declarative alternative for this.

While we are at it, hook up failure action with unit_dump() and
transient units too.
2017-11-20 16:37:22 +01:00
Lennart Poettering 53c35a766f core: generalize FailureAction= move it from service to unit
All kinds of units can fail, hence it makes sense to offer this as
generic concept for all unit types.
2017-11-20 16:37:22 +01:00
John Lin e79eabdb1b man: Requires= stops this unit when dependencies get deactivated (#7391)
Fixes: #7372
2017-11-20 10:55:52 +01:00
Zbigniew Jędrzejewski-Szmek 572eb058cf Add SPDX license identifiers to man pages 2017-11-19 19:08:15 +01:00
Lennart Poettering b94f4313e8 man: document that start limiting of GC'ed units doesn't work (#7337)
Fixes: #7139
2017-11-17 15:18:30 +01:00
Lennart Poettering 5afe510c89 core: add a new unit file setting CollectMode= for tweaking the GC logic
Right now, the option only takes one of two possible values "inactive"
or "inactive-or-failed", the former being the default, and exposing same
behaviour as the status quo ante. If set to "inactive-or-failed" units
may be collected by the GC logic when in the "failed" state too.

This logic should be a nicer alternative to using the "-" modifier for
ExecStart= and friends, as the exit data is collected and logged about
and only removed when the GC comes along. This should be useful in
particular for per-connection socket-activated services, as well as
"systemd-run" command lines that shall leave no artifacts in the
system.

I was thinking about whether to expose this as a boolean, but opted for
an enum instead, as I have the suspicion other tweaks like this might be
a added later on, in which case we extend this setting instead of having
to add yet another one.

Also, let's add some documentation for the GC logic.
2017-11-16 14:38:36 +01:00
Lennart Poettering 2651d03751 man: extend documentation on the unit name escaping logic 2017-11-10 19:45:29 +01:00
John Lin caa45f5b4e man: remove restrictions in [Install] section (#7278)
Now [Install] section also supports drop-in files.

Follow-up for 142468d895.
2017-11-10 00:12:01 +09:00
Shawn Landden ed440f6be9 condition: detect TOMOYO MAC (#7249)
TOMOYO is a Mandatory Access Control security module for Linux.
Rather than ship rules, TOMOYO features a learning mode.

http://tomoyo.osdn.jp/
http://tomoyo.osdn.jp/2.5/index.html.en
2017-11-07 19:12:36 +03:00
Lennart Poettering 14068e17f3 core: add support for expanding state/cache/log directory root in unit files
This augments %t which already resolves to the runtime directory root, and
should be useful for units that want to pass any of these paths in
command line arguments.

Example:

ExecStart=/usr/bin/mydaemon --datadir=%S/mydaemon

Why not expose a specifier resolving directly to the configured
state/runtime/cache/log dir? Three reasons:

1. Specifiers should be independent of configuration of the unit itself,
   and StateDirectory= and friends are unit configuration.  See
   03fc9c723c and related work.

2. We permit multiple StateDirectory= values per unit, and it hence
   wouldn't be clear which one is passed.

3. We already have %t for the runtime directory root, and we should
   continue with the same scheme.
2017-10-26 17:59:09 +02:00
Zbigniew Jędrzejewski-Szmek fc5ffacdab man: update the description of interval limiting (#7128)
Fixes #7125.
2017-10-24 09:41:52 +02:00
Yu Watanabe c85f1346c0 man: add explanation about target's DefaultDependencies= (#7120)
Closes #7113.
2017-10-18 08:30:35 +02:00
Jakub Wilk dcfaecc70a man: fix typos (#7029) 2017-10-10 21:59:03 +02:00
Yu Watanabe 6b5bb2f9d0 man: fix that the same option is listed twice (#6991) 2017-10-04 14:43:00 +02:00
John Lin a195dd8e5a man: Requires= needs After= to deactivate "this unit" (#6869)
Fixes: #6856
2017-09-22 19:15:28 +02:00
Zbigniew Jędrzejewski-Szmek 1245e4132b man: use "filename" not "file name" by default
We settled on "filename" and "file system", so change a couple of places for
consistency. The exception is when there's an adjective before "file" that
binds more strongly then "name": "password file name", "output file name", etc.
Those cases are left intact.
2017-09-15 17:18:29 +02:00
John Lin 45f09f939b man: explicitly distinguish "implicit dependencies" and "default dependencies"
Fixes: #6793
2017-09-13 11:39:09 +08:00
John Lin bbe0b4a8d5 man: move bus-based/socket-based activation out of Automatic Dependencies section
Fixes: #6793
2017-09-12 12:47:18 +08:00
Alan Jenkins 0aabe74749 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 :).
2017-09-09 14:54:23 +02:00
Zbigniew Jędrzejewski-Szmek 26adf7741d man: describe which units types are stopped on isolate
Fixes #6455.
2017-07-28 05:17:05 -04:00
Lennart Poettering 2eb6ff5e71 man: extend Before=/After= documentation a bit
let's clarify what the order actually means for service units.

Fixes: #6097
2017-06-27 21:30:48 +02:00
Lennart Poettering 23254af18d man: be more precise on the ConditionFirstBoot= documentation
Fixes: #5696
2017-06-27 21:30:48 +02:00
Lennart Poettering defdbbb6dc Merge pull request #5926 from fsateler/condition-uid
core: add ConditionUID and ConditionGID
2017-05-29 15:18:38 +02:00
Felipe Sateler 534bab66ab core: add @system special value to ConditionUser=
It allows checking if the user is a system user or a normal user
2017-05-26 09:42:47 -04:00
Felipe Sateler c465a29f24 core: add ConditionUser and ConditionGroup
This adds two options that are useful for user units. In particular, it
is useful to check ConditionUser=!0 to not start for the root user.

Closes: #5187
2017-05-26 09:42:44 -04:00
Alexey Brodkin 27b09f1f1e architecture: add Synopsys DesignWare ARC cores support (#5992)
DesignWare ARC Processors are a family of 32-bit CPUs from Synopsys
used extensively in SoCs of different vendors.
2017-05-19 10:55:24 -04:00
Lennart Poettering 215a2db419 man: fix typo m86k → m68k (#5993) 2017-05-19 11:37:30 +02:00
Lennart Poettering db7076bf78 Merge pull request #5164 from Werkov/ordering-for-_netdev-devices
Ordering for _netdev devices
2017-04-29 18:40:19 +02:00