summaryrefslogtreecommitdiffstats
path: root/src/systemctl/systemctl.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* systemctl: add forgotten --after/--before to --help textLennart Poettering2024-04-231-0/+2
| | | | Follow-up for: afba41995de65d8f378b138ea6d9804be32625a3
* systemctl: add forgotten --reboot-argument= to --help textLennart Poettering2024-04-231-0/+2
| | | | Follow-up for: dae710bef121bfc379423d9d75e7d792074ab71c
* systemctl: add forgotten --message= to --help textLennart Poettering2024-04-231-0/+1
| | | | Follow-up for: 9ef15026c0e7e6600372056c43442c99ec53746e
* systemctl,busctl: sort includesMike Yuan2024-03-261-1/+1
| | | | | Follow-up for 56cb74c3cd1358d7d0b3f613feaf2eeab601a6bd and 00431b2b66cb59540deda4ea018170a289673585
* systemctl: allow connecting to capsule instances with --capsule=/-CLennart Poettering2024-03-141-1/+17
|
* dissect-image: add flag for explicitly enabling userspace verity signature ↵Lennart Poettering2024-02-281-1/+2
| | | | | | | | | | checking let's make userspace verity signature checking optional. This adds a dissection flag to enable the logic and patches through all our users to enable it by default, thus effectively not changing anything from the status quo ante. However, know we have a knob to turn this off in certain scenarios.
* systemctl: drop chain invocation of telinitMichael Biebl2024-02-151-13/+2
| | | | | | | | | This functionality relied on telinit being available in a different path then the compat symlink shipped by systemd itself. This is no longer the case for any known distro, so remove that code. Fixes: #31220 Replaces: #31249
* Merge pull request #30302 from keszybz/systemd-edit-stdinZbigniew Jędrzejewski-Szmek2023-12-061-1/+10
|\ | | | | systemctl edit --stdin
| * systemctl: add "edit --stdin"Zbigniew Jędrzejewski-Szmek2023-12-051-1/+10
| | | | | | | | | | | | | | | | | | | | This is a fancy wrapper around "cat <<EOF", but: - the user doesn't need to figure out the file name, - parent directories are created automatically, - daemon-reload is implied, so it's a convenient way to create units or drop-ins. Closes https://github.com/systemd/systemd/issues/21862.
* | systemctl: add support for Sleep() logind callMike Yuan2023-12-051-0/+4
|/
* parse-util: add parse_tristate() and use it everywhereLennart Poettering2023-11-011-8/+3
| | | | We parse tristates all the time, let's add an explicit parser for them.
* systemctl: automatically softreboot/kexec if set up on rebootLuca Boccassi2023-10-201-4/+1
| | | | | | | | | Automatically softreboot if the nextroot has been set up with an OS tree, or automatically kexec if a kernel has been loaded with kexec --load. Add SYSTEMCTL_SKIP_AUTO_KEXEC and SYSTEMCTL_SKIP_AUTO_SOFT_REBOOT to skip the automated switchover.
* systemctl: is-failed: check if system is degraded when no unit givenMike Yuan2023-10-181-2/+3
| | | | Closes #3335
* systemctl: implement a new "whoami" verb, that just returns unit of caller/PIDLennart Poettering2023-07-041-1/+5
|
* systemctl: add "systemctl soft-reboot" commandLennart Poettering2023-06-021-2/+5
|
* dissect-image: port mount_image_privately_interactively() to use ↵Lennart Poettering2023-05-161-1/+1
| | | | | | | | | | /run/systemd/mount-rootfs/ too Let's use the same common directory as the unit logic uses. This means we have less to clean up, and opens the door to eventually allow unprivileged operation of the mount_image_privately_interactively() logic.
* core/systemctl: when switching root default to /sysroot/Lennart Poettering2023-04-291-2/+2
| | | | | | | | | We hardcode the path the initrd uses to prepare the final mount point at so many places, let's also imply it in "systemctl switch-root" if not specified. This adds the fallback both to systemctl and to PID 1 (this is because both to — different – checks on the path).
* image-policy: introduce parse_image_policy_argument() helperYu Watanabe2023-04-131-14/+8
| | | | | | | | | Addresses https://github.com/systemd/systemd/pull/25608/commits/84be0c710d9d562f6d2cf986cc2a8ff4c98a138b#r1060130312, https://github.com/systemd/systemd/pull/25608/commits/84be0c710d9d562f6d2cf986cc2a8ff4c98a138b#r1067927293, and https://github.com/systemd/systemd/pull/25608/commits/84be0c710d9d562f6d2cf986cc2a8ff4c98a138b#r1067926416. Follow-up for 84be0c710d9d562f6d2cf986cc2a8ff4c98a138b.
* service: allow freeing the fdstore via cleaningLennart Poettering2023-04-131-1/+2
| | | | | | Now that we have a potentially pinned fdstore let's add a concept for cleaning it explicitly on user requested. Let's expose this via "systemctl clean", i.e. the same way as user directories are cleaned.
* tree-wide: hook up image dissection policy logic everywhereLennart Poettering2023-04-051-1/+20
|
* systemctl: add option --when for scheduled shutdownMike Yuan2023-03-141-0/+28
| | | | | | | Pass an empty string or "cancel" will cancel the action. Pass "show" will show the scheduled actions. Replaces #17258
* basic: add RuntimeScope enumLennart Poettering2023-03-101-6/+6
| | | | | | | | | | | | In various tools and services we have a per-system and per-user concept. So far we sometimes used a boolean indicating whether we are in system mode, or a reversed boolean indicating whether we are in user mode, or the LookupScope enum used by the lookup path logic. Let's address that, in introduce a common enum for this, we can use all across the board. This is mostly just search/replace, no actual code changes.
* Merge pull request #26491 from dtardon/list-pathsYu Watanabe2023-02-221-0/+3
|\ | | | | Add systemctl list-paths
| * systemctl: add list-paths verbDavid Tardon2023-02-211-0/+3
| | | | | | | | Fixes #6054.
* | dissect-image: Return mount point fd if requestedDaan De Meyer2023-02-171-0/+1
| |
* | systemctl: add --kill-value= argument to systemctlLennart Poettering2023-02-171-0/+29
|/ | | | | | | | | | | This allows accompanying a signal with a value (as supported for Linux Realtime signals). This is particularly useful as it allows us to do stuff like this: systemctl kill --kill-whom=main --kill-value=0x300 systemd-journald In order to ask journald to flush its allocation caches and compact memory.
* systemctl: suppress warning about missing /proc/ when --no-warnYu Watanabe2023-01-121-7/+7
| | | | | | | | | Follow-up for 0f958c8d4fc13ed1c1af928b2a7d91d31c7576eb. 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.
* systemctl: new option --drop-in for specifying drop-in filenameMike Yuan2022-12-201-0/+9
| | | | | | | | | 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
* Merge pull request #25616 from poettering/chase-symlinks-opendirZbigniew Jędrzejewski-Szmek2022-12-061-0/+8
|\ | | | | chase-symlinks/systemctl: let's handle cases without /proc/ better
| * systemctl: print a clear warning if people invoke systemctl without /proc/Lennart Poettering2022-12-021-0/+8
| |
* | Merge pull request #25437 from ↵Zbigniew Jędrzejewski-Szmek2022-12-051-0/+9
|\ \ | |/ |/| | | | | YHNdnzj/systemctl-disable-warn-statically-enabled-services systemctl: warn if trying to disable a unit with no install info
| * systemctl: allow suppress the warning of no install info using --no-warnMike Yuan2022-12-031-0/+9
| | | | | | | | | | | | 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.
* | systemctl: deprecate passing positional argument to reboot completelyMike Yuan2022-11-271-1/+1
|/ | | | | | | | (follow-up of #15958) In #15958 we deprecated passing positional argument to reboot by generate a warning. It's been two years now and I believe it can be dropped completely, as per requested in #15773.
* basic: move version() to build.h+cZbigniew Jędrzejewski-Szmek2022-11-081-0/+1
|
* shutdown: Add Xen kexec supportSamuel Thibault2022-11-021-0/+1
| | | | | | In the Xen case, it's the hypervisor which manages kexec. We thus have to ask it whether a kernel is loaded, instead of relying on /sys/kernel/kexec_loaded.
* install: include full type name in special UnitFilePresetMode valuesLennart Poettering2022-10-141-1/+1
| | | | | | Typically the _MAX and _INVALID special enum values use the full type as prefix, even if the actual values of the enum might not. Let's follow this rule here too.
* systemctl: add support for --image optionRichard Phibel2022-09-271-1/+39
| | | | | All tools that support --root= should also learn --image= so that they can operate on disk images directly.
* shared/logs-show: add new --output= format "short-delta"Daniel Braunwarth2022-09-231-1/+1
| | | | | | | This new output formatting option is similar to "short-monotonic" but also shows the time delta between two messages. This fixes #24641.
* tree-wide: change --kill-who to --kill-whomZbigniew Jędrzejewski-Szmek2022-08-261-7/+7
| | | | | | | | | | | 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
* systemctl: add list-automounts verbDavid Tardon2022-07-251-0/+3
| | | | Fixes: #6056
* systemctl: enable colorized logging by defaultYu Watanabe2022-07-071-2/+1
|
* systemctl: add `edit` verb to arguments' help textElias Probst2022-06-101-5/+6
| | | | | The arguments `--global`, `--runtime` and `--root` also affect the `edit` verb.
* man/systemctl: improve grammar in description of --check-inhibitorsZbigniew Jędrzejewski-Szmek2022-06-011-2/+2
|
* Rename UnitFileScope to LookupScopeZbigniew Jędrzejewski-Szmek2022-03-291-6/+6
| | | | | | | | | As suggested in https://github.com/systemd/systemd/pull/22649/commits/8b3ad3983f5440eef812b34e5ed862ca59fdf7f7#r837345892 The define is generalized and moved to path-lookup.h, where it seems to fit better. This allows a recursive include to be removed and in general makes things simpler.
* systemctl: rework daemon_reload() functionsLennart Poettering2022-02-221-2/+2
| | | | | | | | | | Let's split out the inner parts of verb_daemon_reload() as a function daemon_reload() and then stop using the former outside of the verbs logic, and instead call the latter whenever we need to reload the daemon as auxiliary opeation. This should make our logic more systematic as we don't have to provide fake or misleading argc/argv to verb_daemon_reload() anymore.
* systemctl: systematically rename verb entrypoints verb_xyz()Lennart Poettering2022-02-221-77/+77
| | | | | | | | | Let's clean up our function naming a bit, and always name the verb_xyz(), where the xyz maps to the command line verb as closely as possible. No actual code changes, just an attempt to make the systemctl sources a bit more systematic, and less surprising.
* systemctl,man: update docs for `--timestamp=`Frantisek Sumsal2022-02-211-5/+2
|
* systemctl: add shutdown --show optionLudwig Nussel2021-12-091-0/+4
| | | | Shows the scheduled shutdown action and time if there's one.
* Make pager_open() return voidZbigniew Jędrzejewski-Szmek2021-11-031-1/+1
|
* run/mount/systemctl: don't fork off PolicyKit/ask-pw agent when in --user modeLennart Poettering2021-08-301-0/+5
| | | | | | | | When we are in --user mode there's no point in doing PolicyKit/ask-pw because both of these systems are only used by system-level services. Let's disable the two agents for that automaticlly hence. Prompted by: #20576