Commit graph

444 commits

Author SHA1 Message Date
David Tardon 160b8e981b man: document systemctl list-paths 2023-02-21 19:03:26 +01:00
Lennart Poettering f4ff3e7149 man: document new --kill-value= switch to systemctl 2023-02-17 09:55:35 +01:00
Mike Yuan 3729976944
systemctl: list-dependencies: support --type= and --state=
Closes #25975
2023-01-16 19:46:52 +08:00
Yu Watanabe 91dfb74ef5 systemctl: suppress warning about missing /proc/ when --no-warn
Follow-up for 0f958c8d4f.

systemctl is called many times by dnf or so, and missing /proc/ is not
a user's fault, but package manager's issue.
With this commit, we can suppress the warning by updating rpm macros if
necessary.
2023-01-12 11:50:41 +09:00
Mike Yuan f206809b97 systemctl: new option --drop-in for specifying drop-in filename
Previously 'systemctl edit' would only operate on
'override.conf', but users may need more than that.
Thus the new option '--drop-in' is added to allow
users to specify the drop-in file name.

Closes #25767
2022-12-20 15:59:11 +01:00
Mike Yuan 8f23229cae systemctl: is-enabled: document the return code change
Follow-up for #25689

We've added a new output ("not-found") in #25689.
2022-12-14 23:21:06 +01:00
Zbigniew Jędrzejewski-Szmek 8608fef36c
Merge pull request #25437 from YHNdnzj/systemctl-disable-warn-statically-enabled-services
systemctl: warn if trying to disable a unit with no install info
2022-12-05 10:27:24 +01:00
Mike Yuan 108d35ac7d
systemctl: allow suppress the warning of no install info using --no-warn
In cases like packaging scripts, it might be desired to use
enable/disable on units without install info. So, adding an
option '--no-warn' to suppress the warning.
2022-12-03 20:26:19 +08:00
Zbigniew Jędrzejewski-Szmek db81144428 tree-wide: BLS and DPS are now on uapi-group website 2022-11-21 12:26:35 +01:00
Frantisek Sumsal 1ca1bb03de man: use the correct 'Markers' property name for marking units
Follow-up to c9615f7352 and 70666e28a1.
2022-11-02 14:36:51 +01:00
Zbigniew Jędrzejewski-Szmek 32d2e70ae4 man: fix count mismatch
We said "search path" and "search paths" in the same sentence…
2022-10-24 12:54:03 +02:00
Richard Phibel 8aa3894eae systemctl: add support for --image option
All tools that support --root= should also learn --image=
so that they can operate on disk images directly.
2022-09-27 09:47:01 +02:00
Lennart Poettering 4d0d34b4e7
Merge pull request #24709 from keszybz/partition-table-constants
Expose various GPT UUIDs as public contants and link them up in docs
2022-09-21 20:07:21 +02:00
Zbigniew Jędrzejewski-Szmek b66a6e1a58 man: "the initial RAM disk" → "the initrd"
In many places we spelled out the phrase behind "initrd" in full, but this
isn't terribly useful. In fact, no "RAM disk" is used, so emphasizing this
is just confusing to the reader. Let's just say "initrd" everywhere, people
understand what this refers to, and that it's in fact an initramfs image.

Also, s/i.e./e.g./ where appropriate.

Also, don't say "in RAM", when in fact it's virtual memory, whose pages
may or may not be loaded in page frames in RAM, and we have no control over
this.

Also, add <filename></filename> and other minor cleanups.
2022-09-20 16:48:50 +02:00
Zbigniew Jędrzejewski-Szmek 483bf5643a man: add missing subject in sentence 2022-09-17 13:12:22 +02:00
Zbigniew Jędrzejewski-Szmek 8a9651088f various: use "-" instead of "n/a" in tables
In the context of a table, both would be generally understood to have the same
meaning. "n/a" is a strange beast. It was useful when tables were produced on
the typewriter with "---------" used to separate rows. It is visually more
pleasing to use "-", and there is no risk of it being mistaken for a row
separator.
2022-09-17 13:05:51 +02:00
Zbigniew Jędrzejewski-Szmek 4ccde410a3 tree-wide: change --kill-who to --kill-whom
getopt allows non-ambiguous abbreviations, so backwards-compat is maintained, and
people can use --kill-who (or even shorter abbreviations). English is flexible,
so in common speach people would use both forms, even if "whom" is technically
more correct. The advantage of using the longer form in the code is that we
effectively allow both forms, so we stop punishing people who DTGCT¹, but still
allow people to use the spoken form if they prefer.

1. Do the gramatically correct thing
2022-08-26 11:15:44 +09:00
Lennart Poettering 1374f5a03a man: fix docbook 2022-08-03 18:51:45 +02:00
Lennart Poettering 157cb4337b systemctl: clarify that "status" is about the most recent invocation of a service
And point people to "journalctl --unit=" for information of prior runs.

Inspired by: #24159
2022-08-03 09:10:07 +02:00
David Tardon 2d5cdc6224 man: document systemctl list-automounts 2022-07-25 13:37:20 +02:00
Zbigniew Jędrzejewski-Szmek 132b63bd31
Merge pull request #15205 from jlebon/pr/preset-all-firstboot
manager: optionally, do a full preset on first boot
2022-07-06 19:11:01 +02:00
Lennart Poettering 0c772b1cc1 man: "enabled commands are started at boot" is rubbish
it's enabled units, and they might be started by various forms of
activation, not just "at boot".

Fix that.
2022-07-06 15:56:53 +02:00
Zbigniew Jędrzejewski-Szmek 5b69a7c540 man/systemctl: improve grammar in description of --check-inhibitors 2022-06-01 09:23:55 +02:00
Zbigniew Jędrzejewski-Szmek a6e334649d systemctl: make show/status honour --state and --type
This makes the interface more flexible, by allowing the same filtering
for show and status as is done for list-units.

Fixes #23207.
2022-05-26 10:37:35 +09:00
Zbigniew Jędrzejewski-Szmek c1e0dc9c88 systemctl: stop saying "vendor preset"
We have vendor presets, and local admin presets, and runtime presets
(under /usr/lib, /usr/local/lib and /etc, /run, respectively). When we
display preset state, it can be configured in any of those places, so
we shouldn't say anything about the origin.

(Another nice advantage is that it improves alignment:

[root@f36 ~]# systemctl list-unit-files multipathd.service
UNIT FILE          STATE   VENDOR PRESET
multipathd.service enabled enabled

^ this looks we have a "PRESET" column that is empty.)
2022-05-04 09:10:50 +02:00
Zbigniew Jędrzejewski-Szmek 76c068b77c man: cross-advertize bootctl and systemctl boot loader support 2022-04-28 16:44:40 +02:00
Lennart Poettering 4bb37359f6 docs: s/straight-forward/straightforward/
Inspired by https://github.com/systemd/systemd/pull/20156#discussion_r810878846
2022-03-15 22:46:09 +00:00
Frantisek Sumsal b58b4a9f37 systemctl,man: update docs for --timestamp= 2022-02-21 13:22:02 +01:00
Paulo Neves c809e38732 docs: Clarify systemctl show manual
The manual incorrectly asserted that the properties in systemctl show
matched the the options in systemd-system.conf, which is not always true.

Add clarification on the equivalence of the properties in systemctl show
and systemd-system.conf

Fixed #21230
2021-11-09 18:31:54 +01:00
Lennart Poettering 7ea5e82f6a man: clarify the situation of unit templates regarding "systemctl list-units" + "systemctl list-unit-files"
Fixes: #21075
2021-10-28 10:45:02 +02:00
Zbigniew Jędrzejewski-Szmek e04eae5e1c man/systemctl: rework descriptions of bind and mount-image
The text used "unit's view" to mean mount namespace. But we talk about
mount namespaces in the later part of the paragraph anyway, so trying to
use an "approachable term" only makes the whole thing harder to understand.
Let's use the precise term.

Some paragraph-breaking and re-indentation is done too.
2021-07-28 10:21:21 +02: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
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
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
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 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 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
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
Jiehong 9ae5fed64e feature: display status with a different shape depending on the status (#17728) 2021-01-22 20:45:43 +01: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
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 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
Yu Watanabe 38f3e0a58d tree-wide: fix typo 2021-01-17 16:20:27 +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
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
Yu Watanabe db9ecf0501 license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
Zbigniew Jędrzejewski-Szmek 0dc9fd56a5 man: document what variables are allowed 2020-10-23 15:49:03 +02:00
Lennart Poettering 84fc961082
Merge pull request #17270 from keszybz/less-secure-mode
Use less in "secure" mode when under sudo
2020-10-14 18:33:10 +02:00
Lennart Poettering 612ebf6c91 pager: set $LESSSECURE whenver we invoke a pager
Some extra safety when invoked via "sudo". With this we address a
genuine design flaw of sudo, and we shouldn't need to deal with this.
But it's still a good idea to disable this surface given how exotic it
is.

Prompted by #5666
2020-10-07 09:23:07 +02:00
Zbigniew Jędrzejewski-Szmek 3b1211574b man: use trailing slash on directories in more places 2020-10-05 18:44:05 +02:00
Zbigniew Jędrzejewski-Szmek 6824c132e9 systemctl: add service-log-{level,target} verbs
Heavily inspired by #15622. This adds:
  systemctl service-log-level systemd-resolved
  systemctl service-log-level systemd-resolved info
  systemctl service-log-target systemd-resolved
  systemctl service-log-target systemd-resolved console

We already have systemctl verbs log-level, log-target, and service-watchdogs.
Those two new verbs tie nicely into this scheme.
2020-09-12 10:22:51 +02:00
Zbigniew Jędrzejewski-Szmek 172338d51b systemctl: list unit introspection verbs first, modification second
The list was rather ad hoc, with "reset-failed" sandwiched between
"help" and "list-dependencies". Since a person will usually either want
to introspect state in various ways or modify state in a certain way, let's
put all the introspection commands together and all the ones that actually
have an effect second.
2020-09-09 16:59:18 +02:00
Lennart Poettering 3c719357dc man: extend on the usec/sec discrepancy
Let's document the discrepancy between the Sec and USec suffixing of
unit files and D-Bus properties at three places: in "systemctl show"
(where it already was briefly mentioned), in the D-Bus interface
description (at one place at least, i.e. the most prominent of
properties that encapsulate time values, there are many more) and in the
general man page explaining time values.

By documenting this at all three places I think we now do as much as we
can do about this highlighting the discrepancy of the naming and the
reasons behind it.

Fixes: #2047
2020-08-28 18:01:17 +02:00
Luca Boccassi 46ad9c5378 systemctl: add --timestamp to change timestamp print format
Timestamps for unit start/stop are recorded with microsecond granularity,
but status and show truncate to second granularity by default.
Add a --timestamp=pretty|us|utc option to allow including the microseconds
or to use the UTC TZ to all timestamps printed by systemctl.
2020-08-19 15:30:13 +01:00
Zbigniew Jędrzejewski-Szmek 5cf821acf8 man: do not say that isolate is like switching runlevels
We need to do better here, but for now let's at least not trick
users into nuking their graphical environment. Inspired by #16548.
2020-07-23 15:30:35 +02:00
Zbigniew Jędrzejewski-Szmek bdac560801 tree-wide: drop quotes from around [section]
For users, the square brackets already serve as markup and clearly delineate
the section name from surrounding text. Putting additional markup around that
only adds clutter. Also, we were very inconsistent in using the quotes. Let's
just drop them altogether.
2020-07-06 11:29:05 +02:00
Zbigniew Jędrzejewski-Szmek e9dd698407 tree-wide: fixes for assorted grammar and spelling issues
Fixes #16363. Also includes some changes where I generalized the pattern.
2020-07-06 11:29:05 +02:00
laydervus dae710bef1 #15773 add --reboot-argument to systemctl reboot 2020-05-29 21:22:29 +01:00
Zbigniew Jędrzejewski-Szmek 201632e314 tree-wide: s/time-out/timeout/g
See 3f9a0a522f for justification.
2020-05-26 10:28:59 +02:00
Lennart Poettering c92391f52f
Merge pull request #15692 from keszybz/preset-cleanup
Make systemctl list-unit-files output more useful
2020-05-06 08:19:37 +02:00
Zbigniew Jędrzejewski-Szmek 15d7ab87c4 systemctl: add new enablement state "alias"
For units which are aliases of other units, reporting preset status as
"enabled" is rather misleading. For example, dbus.service is an alias of
dbus-broker.service. In list-unit-files we'd show both as "enabled".  In
particular, systemctl preset ignores aliases, so showing any preset status at
all is always going to be misleading. Let's introduce a new state "alias" and
use that for all aliases.

I was trying to avoid adding a new state, to keep compatibility with previous
behaviour, but for alias unit files it simply doesn't seem very useful to show
any of the existing states. It seems that the clearly showing that those are
aliases for other units will be easiest to understand for users.
2020-05-05 21:50:38 +02:00
Michal Sekletár d9e45bc3ab core: introduce support for cgroup freezer
With cgroup v2 the cgroup freezer is implemented as a cgroup
attribute called cgroup.freeze. cgroup can be frozen by writing "1"
to the file and kernel will send us a notification through
"cgroup.events" after the operation is finished and processes in the
cgroup entered quiescent state, i.e. they are not scheduled to
run. Writing "0" to the attribute file does the inverse and process
execution is resumed.

This commit exposes above low-level functionality through systemd's DBus
API. Each unit type must provide specialized implementation for these
methods, otherwise, we return an error. So far only service, scope, and
slice unit types provide the support. It is possible to check if a
given unit has the support using CanFreeze() DBus property.

Note that DBus API has a synchronous behavior and we dispatch the reply
to freeze/thaw requests only after the kernel has notified us that
requested operation was completed.
2020-04-30 19:02:51 +02:00
Zbigniew Jędrzejewski-Szmek df9578498f resolve: allow setting the log level dynamically as in pid1
This is useful to raise the log level for a single transaction or a few,
without affecting other state of the resolved as a restart would.
The log level can only be set, I didn't bother with having the ability
to restore the original as in pid1.
2020-04-20 15:33:18 +02:00
Zbigniew Jędrzejewski-Szmek 5292c24047 systemctl: add -P as short for --value --property= 2020-04-03 18:24:20 +02:00
Zbigniew Jędrzejewski-Szmek 94c3a838da systemctl: make list-dependencies take multiple arguments
Other similar commands do, no reason not to do this here too.
2020-03-05 08:27:58 +01:00
Lennart Poettering 0b9da3d9e8
Merge pull request #14293 from keur/systemctl_with_dependencies
systemctl: Add --with-dependencies switch
2020-01-13 17:42:55 +01:00
Kevin Kuehler a602a0b44b man: Document systemctl --with-dependencies switch 2020-01-09 22:58:00 -08:00
Felipe Sateler 11fcfc5398 Fix several typos in documentation
Found by lintian
2019-12-24 14:45:40 +01:00
Zbigniew Jędrzejewski-Szmek 3d58bfc01c man: document all pager variables for systemctl and systemd
In those two pages, we need to include individual entries with xi:include to
merge the list less-variables.xml with the other entries, which is obviously
error prone. All variables are supported in both tools so add them.
2019-11-24 13:59:32 +01:00
Zbigniew Jędrzejewski-Szmek 6ab863190d systemctl: add service-watchdogs command
The rationale is the same as for log-level/log-target: this controls the behaviour
of the manager, and belongs in systemctl.
2019-11-18 16:28:38 +01:00
Zbigniew Jędrzejewski-Szmek 38fcb7f766 systemctl: add log-level and log-target commands
This copies the commands log-level and log-target (to query and set the current
settings) from systemd-analyze to systemctl, essentially reverting
a65615ca5d. Controllling the log level settings
of the manager is basic functionality, that should be available even if
systemd-analyze (which is more of an analysis tool) is not installed. This is
like dmesg and journalctl, which should be available even if a debugger and
more advanced tools to analyze the kernel are not available. (Note that dmesg
is used to control the log level too, not just to browse the kernel logs.)

I chose to copy&paste the methods from analyze.c to the new location. There
isn't enough code to share, because acquire_bus() in both places has a
different signature despite the same name, so the only part that is common
is the invocation of sd_bus_set_property().
2019-11-18 16:26:17 +01:00
Kevin Kuehler 132e0b532c man: Document --job-mode=triggering switch 2019-11-05 11:17:56 -08:00
Zbigniew Jędrzejewski-Szmek 1d56bc094c systemctl: emit warning if start is used with globs
Fixes #6379.
2019-10-16 17:33:40 +02:00
Zbigniew Jędrzejewski-Szmek e1fac8a68a Move the Commands section above Options section
For executables which take a verb, we should list the verbs first, and
then options which modify those verbs second. The general layout of
the man page is from general description to specific details, usually
Overview, Commands, Options, Return Value, Examples, References.
2019-10-08 18:21:26 +02:00
Carlo Teubner f06530d86b man/systemctl.xml: fix missing "not" 2019-09-05 07:43:00 +09:00
Zbigniew Jędrzejewski-Szmek 4f0acdb366 man: add note about systemctl stop return value
Fixes #13104.

(I know a lot more could be added to that  man page. This patch only addresses that
once specific complaint.)
2019-07-18 16:20:38 +02:00
Lennart Poettering 5b792edb68 man: add example for setting multiple properties at once
Fixes: #4908
2019-07-12 16:00:23 +02:00
Lennart Poettering 84f8e250ff man: CPUShares= is so 2015
Let's update our example to the brave new cgroupsv2 world, and use
CPUWeight= in our example.
2019-07-12 16:00:13 +02:00
Lennart Poettering 8c8208cb80 man: document new "systemctl clean…" operation 2019-07-11 12:18:51 +02:00
Philip Withnall f627573031 man: Add missing <literal> tags in various man pages
A minor formatting improvement brought to you by the wonders of `git
grep`.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-06-12 10:39:50 +01:00
Lennart Poettering df4a7cb732 man: document the new systemctl --show-transaction option 2019-03-27 12:37:37 +01:00
Zbigniew Jędrzejewski-Szmek 3a54a15760 man: use same header for all files
The "include" files had type "book" for some raeason. I don't think this
is meaningful. Let's just use the same everywhere.

$ perl -i -0pe 's^..DOCTYPE (book|refentry) PUBLIC "-//OASIS//DTD DocBook XML V4.[25]//EN"\s+"http^<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"\n  "http^gms' man/*.xml
2019-03-14 14:42:05 +01:00
Zbigniew Jędrzejewski-Szmek 0307f79171 man: standarize on one-line license header
No need to waste space, and uniformity is good.

$ perl -i -0pe 's|\n+<!--\s*SPDX-License-Identifier: LGPL-2.1..\s*-->|\n<!-- SPDX-License-Identifier: LGPL-2.1+ -->|gms' man/*.xml
2019-03-14 14:29:37 +01:00
Lennart Poettering 97af80c5a7 systemctl: add support for booting into boot menu/entry
(This also removes support for booting into the EFI firmware setup
without logind. That's because otherwise the non-EFI fallback logind
implements can't work.)

Fixes: #9896
2019-03-05 16:52:46 +01:00
Lucas Werkmeister 4fa226ff3b man: systemctl: document effect of --all on journal output
Based on the journalctl documentation of this option added in 23ad99b519
(#10527), but with the first reference to “fields” replaced by “journal
messages”, since I think it’s less common to show other fields with
`systemctl status` (though it’s possible with the `-o` option).
2019-01-06 14:03:16 +01:00
Michael Biebl 1830ac51a4 Revert "systemctl: when removing enablement or mask symlinks, cover both /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 4910b35078.

Fixes: #9393
2018-11-27 15:15:52 +01:00
Lennart Poettering ff5bd14bb4 man: document that "list-dependencies --reverse" is pretty incomplete
Fixes: #9681
2018-10-30 15:30:18 +01:00
Lennart Poettering 860cc6df6d man: document that "systemctl reset-failed" also reset the start limit counters
Fixes: #10529
2018-10-30 15:30:18 +01: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
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
Zbigniew Jędrzejewski-Szmek 23a9ffb093 man: add a description of systemctl return codes
Fixes #10056.
2018-09-14 16:02:48 +02:00
Liberasys 8b247b43c8 man: fix a typo in the documentation (#10003) 2018-09-04 00:35:44 +09:00
Filipe Brandenburger adb6cd9be2 systemctl: add support for --wait to is-system-running
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.
2018-08-07 09:33:25 +02:00
Christian Rebischke e92b3655b8 fixed ugly colorcodes on brackets
Signed-off-by: Christian Rebischke <Chris.Rebischke@posteo.de>
2018-07-24 10:43:31 +02:00
Zbigniew Jędrzejewski-Szmek f07b548940 man: fix list-files example
The dot is only shown for failed units.

Alternative for #9644.
2018-07-19 11:31:05 +02:00
Lennart Poettering 81d39f0d2c man: fix --ignore-inhibitors docs
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
2018-07-17 09:49:04 -07:00
Zbigniew Jędrzejewski-Szmek 514094f933 man: drop mode line in file headers
This is already included in .dir-locals, so we don't need it
in the files themselves.
2018-07-03 01:32:25 +02:00