aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Revert "systemctl: when removing enablement or mask symlinks, cover both ↵Michael Biebl2018-11-271-11/+11
| | | | | | | | | | | | | | | | | | | | | | | /run and /etc" Having systemctl disable/unmask remove all symlinks in /etc and /run is unintuitive and breaks existing use cases. systemctl should behave symmetrically. A "systemctl --runtime unmask" should undo a "systemctl --runtime mask" action. Say you have a service, which was masked by the admin in /etc. If you temporarily want to mask the execution of the service (say in a script), you'd create a runtime mask via "systemctl --runtime mask". It is is now no longer possible to undo this temporary mask without nuking the admin changes, unless you start rm'ing files manually. While it is useful to be able to remove all enablement/mask symlinks in one go, this should be done via a separate command line switch, like "systemctl --all unmask". This reverts commit 4910b35078ad24dcbc63f372b2fee087640201d0. Fixes: #9393
* man: document that "list-dependencies --reverse" is pretty incompleteLennart Poettering2018-10-301-0/+4
| | | | Fixes: #9681
* man: document that "systemctl reset-failed" also reset the start limit countersLennart Poettering2018-10-301-0/+6
| | | | Fixes: #10529
* man: systemctl: clarify that --lines=0 is allowed (#10375)Lucas Werkmeister2018-10-131-3/+2
| | | | | | | | | 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
* man: add systemctl suspend-then-hibernate (#10194)Jonas DOREL2018-09-281-2/+13
| | | | | This commit tries to document the systemctl suspend-then-hibernate documentation in the systemctl(1) manpage. Fixes #10192.
* man: add a description of systemctl return codesZbigniew Jędrzejewski-Szmek2018-09-141-2/+50
| | | | Fixes #10056.
* man: fix a typo in the documentation (#10003)Liberasys2018-09-041-1/+1
|
* systemctl: add support for --wait to is-system-runningFilipe Brandenburger2018-08-071-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to wait until boot is finished without having to poll for this command repeatedly, instead using the syntax: $ systemctl is-system-running --wait Waiting is implemented by waiting for the StartupFinished signal to be posted on the bus. Register the matcher before checking for the property to avoid race conditions. Tested by artificially delaying startup with a oneshot service and calling this command, checked that it emitted `running` and exited with a 0 return code as soon as the delay service completed startup. Also tested that booting to degraded state unblocks the command. Inserted a delay between getting the property and waiting for the signal and confirmed this seems to work free of race conditions. Updated the --help text (under --wait) and the man page to document the new feature.
* fixed ugly colorcodes on bracketsChristian Rebischke2018-07-241-8/+8
| | | | Signed-off-by: Christian Rebischke <Chris.Rebischke@posteo.de>
* man: fix list-files exampleZbigniew Jędrzejewski-Szmek2018-07-191-2/+2
| | | | | | The dot is only shown for failed units. Alternative for #9644.
* man: fix --ignore-inhibitors docsLennart Poettering2018-07-171-12/+7
| | | | | | | | | | Reported here: https://lists.freedesktop.org/archives/systemd-devel/2018-June/040939.html Also see: https://lists.freedesktop.org/archives/systemd-devel/2018-July/041036.html
* man: drop mode line in file headersZbigniew Jędrzejewski-Szmek2018-07-031-1/+1
| | | | | This is already included in .dir-locals, so we don't need it in the files themselves.
* man: drop unused <authorgroup> tags from man sourcesZbigniew Jędrzejewski-Szmek2018-06-141-9/+0
| | | | | | | | | | | | Docbook styles required those to be present, even though the templates that we use did not show those names anywhere. But something changed semi-recently (I would suspect docbook templates, but there was only a minor version bump in recent years, and the changelog does not suggest anything related), and builds now work without those entries. Let's drop this dead weight. Tested with F26-F29, debian unstable. $ perl -i -0pe 's/\s*<authorgroup>.*<.authorgroup>//gms' man/*xml
* tree-wide: remove Lennart's copyright linesLennart Poettering2018-06-141-2/+0
| | | | | | | | | | | These lines are generally out-of-date, incomplete and unnecessary. With SPDX and git repository much more accurate and fine grained information about licensing and authorship is available, hence let's drop the per-file copyright notice. Of course, removing copyright lines of others is problematic, hence this commit only removes my own lines and leaves all others untouched. It might be nicer if sooner or later those could go away too, making git the only and accurate source of authorship information.
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-06-141-2/+0
| | | | | | | | | | | | | | | | This part of the copyright blurb stems from the GPL use recommendations: https://www.gnu.org/licenses/gpl-howto.en.html The concept appears to originate in times where version control was per file, instead of per tree, and was a way to glue the files together. Ultimately, we nowadays don't live in that world anymore, and this information is entirely useless anyway, as people are very welcome to copy these files into any projects they like, and they shouldn't have to change bits that are part of our copyright header for that. hence, let's just get rid of this old cruft, and shorten our codebase a bit.
* core: introduce a new load state "bad-setting"Lennart Poettering2018-06-111-11/+14
| | | | | | | | | | | | | | | | | | Since bb28e68477a3a39796e4999a6cbc6ac6345a9159 parsing failures of certain unit file settings will result in load failures of units. This introduces a new load state "bad-setting" that is entered in precisely this case. With this addition error messages on bad settings should be a lot more explicit, as we don't have to show some generic "errno" error in that case, but can explicitly say that a bad setting is at fault. Internally this unit load state is entered as soon as any configuration loader call returns ENOEXEC. Hence: config parser calls should return ENOEXEC now for such essential unit file settings. Turns out, they generally already do. Fixes: #9107
* man: don't mention "stub" and "merged" unit load statesLennart Poettering2018-06-111-12/+7
| | | | | | These states should never be visible to the outside, as they are used only internally while loading unit. Hence let's drop them from the documentation.
* systemctl: when removing enablement or mask symlinks, cover both /run and /etcZbigniew Jędrzejewski-Szmek2018-06-011-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'systemctl disable --runtime' would disable a unit, but only if it was enabled with '--runtime', and silently do nothing if the unit was enabled persistently. And similarly 'systemctl disable' would do nothing if the unit was enabled in /run. This just doesn't seem useful. This pathch changes enable/disable and mask/unmask to be asymmetrical. enable and mask create symlinks in /etc or /run, depending on whether --runtime was specified. disable and unmask remove symlinks from both locations. --runtime cannot be specified for the disable and unmask verbs. The advantage is that 'disable' now means that the unit is disabled, period. And similarly for 'unmask', all masks are removed. Similarly for preset and preset-all, they now cannot be called with --runtime, and are asymmetrical: when they enable a unit, symlinks are created in /etc. When they disable a unit, all symlinks are nuked. $ systemctl --root=/ enable bluetooth Created symlink /etc/systemd/system/dbus-org.bluez.service → /usr/lib/systemd/system/bluetooth.service. Created symlink /etc/systemd/system/bluetooth.target.wants/bluetooth.service → /usr/lib/systemd/system/bluetooth.service. $ systemctl --root=/ --runtime enable bluetooth Created symlink /run/systemd/system/dbus-org.bluez.service → /usr/lib/systemd/system/bluetooth.service. Created symlink /run/systemd/system/bluetooth.target.wants/bluetooth.service → /usr/lib/systemd/system/bluetooth.service. $ systemctl --root=/ disable bluetooth Removed /run/systemd/system/bluetooth.target.wants/bluetooth.service. Removed /run/systemd/system/dbus-org.bluez.service. Removed /etc/systemd/system/bluetooth.target.wants/bluetooth.service. Removed /etc/systemd/system/dbus-org.bluez.service. $ systemctl --root=/ disable --runtime bluetooth --runtime cannot be used with disable $ systemctl --root=/ mask --runtime bluetooth Created symlink /run/systemd/system/bluetooth.service → /dev/null. $ systemctl --root=/ mask bluetooth Created symlink /etc/systemd/system/bluetooth.service → /dev/null. $ systemctl --root=/ unmask bluetooth Removed /run/systemd/system/bluetooth.service. Removed /etc/systemd/system/bluetooth.service. $ systemctl --root=/ unmask --runtime bluetooth --runtime cannot be used with unmask $ systemctl --root=/ --runtime enable bluetooth Created symlink /run/systemd/system/dbus-org.bluez.service → /usr/lib/systemd/system/bluetooth.service. Created symlink /run/systemd/system/bluetooth.target.wants/bluetooth.service → /usr/lib/systemd/system/bluetooth.service. $ systemctl --root=/ enable bluetooth Created symlink /etc/systemd/system/dbus-org.bluez.service → /usr/lib/systemd/system/bluetooth.service. Created symlink /etc/systemd/system/bluetooth.target.wants/bluetooth.service → /usr/lib/systemd/system/bluetooth.service. $ systemctl --root=/ preset bluetooth Removed /run/systemd/system/bluetooth.target.wants/bluetooth.service. Removed /run/systemd/system/dbus-org.bluez.service. Removed /etc/systemd/system/bluetooth.target.wants/bluetooth.service. Removed /etc/systemd/system/dbus-org.bluez.service. $ systemctl --root=/ preset --runtime bluetooth --runtime cannot be used with preset $ systemctl preset-all --runtime --runtime cannot be used with preset-all
* man: Fix a minor typo in systemctl(1)Philip Withnall2018-05-111-1/+1
| | | | Signed-off-by: Philip Withnall <withnall@endlessm.com>
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | 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.
* man: use unicode ellipsis in one more place (#8496)Zbigniew Jędrzejewski-Szmek2018-03-201-1/+1
| | | | | Also add note where it should *not* be used. https://github.com/systemd/systemd/pull/8408#discussion_r175606771
* man: beef up description of systemctl list-unitsZbigniew Jędrzejewski-Szmek2018-03-091-0/+36
| | | | Fixes https://bugs.freedesktop.org/show_bug.cgi?id=88135.
* man: document that link-ed files must be on /Zbigniew Jędrzejewski-Szmek2018-03-011-2/+8
| | | | Fixes #8307.
* systemctl,man: use PROPERTY as the placeholder for a property nameZbigniew Jędrzejewski-Szmek2018-02-221-5/+5
|
* systemctl,man: use UNIT as the placeholder for a unit nameZbigniew Jędrzejewski-Szmek2018-02-221-19/+19
| | | | | | | | NAME is kind of meaningless, because everything has a name. "Unit" makes it more obvious that a name of a unit is necessary. I was always momentarily baffled by "set-property NAME ASSIGNMENT...", where there are two objects (the unit and the property), and it's not clear which of the two "NAME" is supposed to signify.
* Revert "man: mention that systemctl is-active or is-failed do not load units"Lennart Poettering2018-01-251-11/+0
| | | | This reverts commit c7612b20052d9151f60a96623b8743cbac88390d.
* man: mention that systemctl is-active or is-failed do not load unitsYu Watanabe2018-01-161-0/+11
| | | | See the discussion in the issue #7875.
* man: "systemd" is to be written in all lower-case, even at beginnings of ↵Lennart Poettering2017-12-131-1/+1
| | | | | | sentences This very important commit is very important.
* Merge pull request #7154 from keszybz/bootspecLennart Poettering2017-11-201-0/+13
|\ | | | | List bootspec entries in bootctl and use the default for kexec
| * systemctl: add --dry-run argumentZbigniew Jędrzejewski-Szmek2017-11-071-0/+13
| |
* | Add SPDX license identifiers to man pagesZbigniew Jędrzejewski-Szmek2017-11-191-0/+2
| |
* | man: write "stop and start" instead of "restart" when explaining the reload ↵Lennart Poettering2017-11-171-14/+9
| | | | | | | | | | | | | | | | | | | | | | fallback operations We already made a similar change when talking about the "restart" command, let's also do this for "systemctl reload" and friends. Follow-up for: 6539dd7c42946d9ba5dc43028b8b5785eb2db3c5 See: #7126
* | man: document the interaction of "systemctl restart" and the FD storeLennart Poettering2017-11-171-3/+11
|/ | | | See: #7126
* man: fix typos (#7029)Jakub Wilk2017-10-101-1/+1
|
* man: document which special "systemctl" commands are synchronous and which ↵Lennart Poettering2017-10-041-72/+74
| | | | | | | | | | asynchronous. This documents the status quo, clarifying when we are synchronous and when asynchronous by default and when --no-block is support to force asynchronous operation. See: #6479
* install: consider non-Alias=/non-DefaultInstance= symlinks as "indirect" ↵Zbigniew Jędrzejewski-Szmek2017-09-221-1/+1
| | | | | | | | | | | | | | | | | enablement I think this matches the spirit of "indirect" well: the unit *might* be active, even though it is not "installed" in the sense of symlinks created based on the [Install] section. The changes to test-install-root touch the same lines as in the previous commit; the change in each case is from assert_se(unit_file_get_state(...) >= 0 && state == UNIT_FILE_ENABLED) to assert_se(unit_file_get_state(...) >= 0 && state == UNIT_FILE_DISABLED) to assert_se(unit_file_get_state(...) >= 0 && state == UNIT_FILE_INDIRECT) in the last two commits.
* install: only consider names in Alias= as "enabling"Zbigniew Jędrzejewski-Szmek2017-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | When a unit has a symlink that makes an alias in the filesystem, but that name is not specified in [Install], it is confusing is the unit is shown as "enabled". Look only for names specified in Alias=. Fixes #6338. v2: - Fix indentation. - Fix checking for normal enablement, when the symlink name is the same as the unit name. This case wasn't handled properly in v1. v3: - Rework the patch to also handle templates properly: A template templ@.service with DefaultInstance=foo will be considered enabled only when templ@foo.service symlink is found. Symlinks with other instance names do not count, which matches the logic for aliases to normal units. Tests are updated.
* manager: fix job mode when signalled to shutdown etcAlan Jenkins2017-08-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* man: fix note for `systemctl enable --global` (#6592)Alan Jenkins2017-08-301-2/+2
| | | The last sentence in the paragraph described the behaviour of `--global`. But "the last case" we listed was "only this boot", which does not match... This was the fifth case described, but there are only _four_ different option names. Fix it.
* man: fix typos (#6532)Jakub Wilk2017-08-031-1/+1
|
* man: describe which units types are stopped on isolateZbigniew Jędrzejewski-Szmek2017-07-281-3/+5
| | | | Fixes #6455.
* Use "dollar-single-quotes" to escape shell-sensitive stringsZbigniew Jędrzejewski-Szmek2017-06-191-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | | Also called "ANSI-C Quoting" in info:(bash) ANSI-C Quoting. The escaping rules are a POSIX proposal, and are described in http://austingroupbugs.net/view.php?id=249. There's a lot of back-and-forth on the details of escaping of control characters, but we'll be only using a small subset of the syntax that is common to all proposals and is widely supported. Unfortunately dash and fish and maybe some other shells do not support it (see the man page patch for a list). This allows environment variables to be safely exported using show-environment and imported into the shell. Shells which do not support this syntax will have to do something like export $(systemctl show-environment|grep -v '=\$') or whatever is appropriate in their case. I think csh and fish do not support the A=B syntax anyway, so the change is moot for them. Fixes #5536. v2: - also escape newlines (which currently disallowed in shell values, so this doesn't really matter), and tabs (as $'\t'), and ! (as $'!'). This way quoted output can be included directly in both interactive and noninteractive bash.
* man: change /lib to /usr/lib (#5618)Lucas Werkmeister2017-03-201-1/+1
| | | | | | | | Per man:file-hierarchy(7), /lib is just a compatibility symlink; the other manpages also refer to /usr/lib. Found with: git grep -P '(?<!/usr|/var|local)/lib' man/
* man: fix typo (#5468)AsciiWolf2017-02-271-1/+1
|
* man: systemctl list-timers: Provide sample output and document it. (#5463)Mark Stosberg2017-02-261-0/+15
| | | | As with `systemctl list-sockets` and `systemctl status`, we provide a sample output for `systemctl list-timers` and document what the columns mean.
* man: use https:// in URLsAsciiWolf2017-02-211-1/+1
|
* systemctl: restore --failed (#5198)Zbigniew Jędrzejewski-Szmek2017-02-021-4/+8
| | | | | | | | | 'systemctl --failed' is an extremely common operation and it's nice to have a shortcut for it. Revert "man: don't document systemctl --failed" and add the option back to systemctl's help and shell completion scripts. This reverts commit 036359ba8d0aba7db7eac75d10073a849a033fd1.
* man: fix typo (#5093)AsciiWolf2017-01-171-2/+2
|
* man: provide a basic guide to the `systemctl status` output (#4950)Mark Stosberg2017-01-141-0/+50
| | | | | | | | | | | - Show example of all `systemctl status` output and documents what possible "Loaded:", "Active" and "Enabled" values mean. - Documents what different colors of the dot mean. - Documents "gotcha" with load-on-demand behavior which will report units as "loaded" even if they are only loaded to show their status. (From @poettering: https://github.com/systemd/systemd/issues/5063#issuecomment-272115024 )
* Document how restart actions work (#5052)micah2017-01-111-6/+6
| | | When a user is trying to understand what is going on with a restart action, it is useful to explicitly describe how the action is run. It may seem obvious, but it is helpful to be explicit so one knows there isn't a special ExecRestart= or similar option that they could be looking at.