summaryrefslogtreecommitdiff
path: root/man/systemctl.xml
AgeCommit message (Collapse)Author
2016-10-24shared, systemctl: teach is-enabled to show installation targetsJan Synacek
It may be desired by users to know what targets a particular service is installed into. Improve user friendliness by teaching the is-enabled command to show such information when used with --full. This patch makes use of the newly added UnitFileFlags and adds UNIT_FILE_DRY_RUN flag into it. Since the API had already been modified, it's now easy to add the new dry-run feature for other commands as well. As a next step, --dry-run could be added to systemctl, which in turn might pave the way for a long requested dry-run feature when running systemctl start.
2016-10-17man: mention that systemctl --root=/ operates on the fs directlyZbigniew Jędrzejewski-Szmek
2016-10-12man: typo fixesThomas Hindoe Paaboel Andersen
A mix of fixes for typos and UK english
2016-10-11man: avoid using the term "loaded" for units currently in memory, since we ↵Lennart Poettering
also have a unit state of that name Fixes: #3971
2016-10-11man: expand the documentation of $SYSTEMD_PAGER and related environment ↵Lennart Poettering
variables Document the default pagers used, as well as $SYSTEMD_LESSCHARSET. Fixes: #4143
2016-10-01systemctl: Add --wait option to wait until started units terminate againMartin Pitt
Fixes #3830
2016-09-28man: remove duplicate "the" for systemctl --plain (#4230)Alfie John
2016-09-15Update systemctl.xml (#4151)kristbaum
2016-08-22core: add Ref()/Unref() bus calls for unitsLennart Poettering
This adds two (privileged) bus calls Ref() and Unref() to the Unit interface. The two calls may be used by clients to pin a unit into memory, so that various runtime properties aren't flushed out by the automatic GC. This is necessary to permit clients to race-freely acquire runtime results (such as process exit status/code or accumulated CPU time) on successful service termination. Ref() and Unref() are fully recursive, hence act like the usual reference counting concept in C. Taking a reference is a privileged operation, as this allows pinning units into memory which consumes resources. Transient units may also gain a reference at the time of creation, via the new AddRef property (that is only defined for transient units at the time of creation).
2016-08-19Merge pull request #3955 from keszybz/fix-preset-allLennart Poettering
Fix preset-all
2016-08-19man: document that "systemctl switch-root" tries hard to pass state across ↵Lennart Poettering
(#3995) As suggested: https://github.com/systemd/systemd/pull/3958#issuecomment-240410958 Let's document that we try hard to pass system state from the initrd to the host, and even compare the systemd binary paths.
2016-08-19man: describe what symlinks to unit do, and specify that presets must use ↵Zbigniew Jędrzejewski-Szmek
real names The man pages didn't ever mention that symlinks to units can be created, and what exactly this means. Fix that omission, and disallow presets on alias names.
2016-08-04man: describe list-dependencies --allZbigniew Jędrzejewski-Szmek
Meaning of --all was mentioned in list-dependencies description, but the this effect should also be mentioned in the description of the option itself.
2016-07-25man: use "search for unit"Zbigniew Jędrzejewski-Szmek
To "search something", in the meaning of looking for it, is valid, but "search _for_ something" is much more commonly used, especially when the meaning could be confused with "looking _through_ something" (for some other object). (C.f. "the police search a person", "the police search for a person".) Also reword the rest of the paragraph to avoid using "automatically" three times.
2016-07-25man: update systemctl man page for unit file commands, in particular ↵Lennart Poettering
"systemctl enable" Clarify that "systemctl enable" can operate either on unit names or on unit file paths (also, adjust the --help text to clarify this). Say that "systemctl enable" on unit file paths also links the unit into the search path. Many other fixes. This should improve the documentation to avoid further confusion around #3706.
2016-06-24systemctl: Create new unit files with "edit --force" (#3584)Doug Christman
2016-05-31man: document that systemctl -ff reboot does not require PID 1 to work (#3310)Lennart Poettering
As suggested in https://github.com/systemd/systemd/issues/3282#issuecomment-220264509
2016-05-23man: explain what list-units does a bit better (#3324)Zbigniew Jędrzejewski-Szmek
https://bugzilla.redhat.com/show_bug.cgi?id=1338584
2016-04-21systemctl,pid1: do not warn about missing install info with "preset"Zbigniew Jędrzejewski-Szmek
When "preset" was executed for a unit without install info, we'd warn similarly as for "enable" and "disable". But "preset" is usually called for all units, because the preset files are provided by the distribution, and the units are under control of individual programs, and it's reasonable to call "preset" for all units rather then try to do it only for the ones that can be installed. We also don't warn about missing info for "preset-all". Thus it seems reasonable to silently ignore units w/o install info when presetting. (In addition, when more than one unit was specified, we'd issue the warning only if none of them had install info. But this is probably something to fix for enable/disable too.)
2016-04-12core,systemctl: add new "systemctl revert" commandLennart Poettering
This allows dropping all user configuration and reverting back to the vendor default of a unit file. It basically undoes what "systemctl edit", "systemctl set-property" and "systemctl mask" do.
2016-04-12install: introduce a new unit file state "transient"Lennart Poettering
Now, that the search path logic knows the unit path for transient units we also can introduce an explicit unit file state "transient" that clarifies to the user what kind of unit file he is encountering.
2016-04-12core: add a new unit file state "generated"Lennart Poettering
Now that we store the generator directories in LookupPaths we can use this to intrdouce a new unit file state called "generated", for units in these directories. Fixes: #2348
2016-04-04systemctl: add --value optionZbigniew Jędrzejewski-Szmek
With this option, systemctl will only print the rhs in show: $ systemctl show -p Wants,After systemd-journald --value systemd-journald.socket ... systemd-journald-dev-log.socket ... This is useful in scripts, because the need to call awk or similar is removed.
2016-02-10man: follow up fixes for #2575Zbigniew Jędrzejewski-Szmek
2016-02-10man: correct explanation of "systemctl is-enabled" outputLennart Poettering
The "is-enabled" command doesn't care whether the symlinks are declared in the [Install] section of a unit file or not, when returning "enabled". Any alias, .wants/ or .requires/ symlinks suffice. Fixes: #975
2016-02-10man: document that "systemctl enable" supports abbreviated unit file namesLennart Poettering
Fixes: #1502
2016-01-28systemctl: rename "reload-or-try-restart" verb to "try-reload-or-restart"Lennart Poettering
But also keep the old name as (undocumented) compatibility around. The reload-or-try-restart was documented to be a NOP if the unit is not running, since the previous commits this is also implemented. The old name suggests that the "try" logic only applies to restarting. Fix this, by moving the "try-" to the front, to indicate that the whole option is a NOP if the service isn't running.
2016-01-28man: stop documenting legacy RedHatismsLennart Poettering
We generally document only the supported verbs, but not the compatibility verbs we also support, in order to keep the documentation minimal.
2016-01-27Merge branch 'pr/980'Daniel Mack
2016-01-27man: make systemctl is-enabled description match enable.Andrei Borzenkov
systemctl is-enabled is not limited to wants.d - it also checks for requires.d and alias links.
2016-01-27man: document that unit file globbing only operates on primary unit namesLennart Poettering
See: #2397
2015-12-26man: fix typosJakub Wilk
2015-12-21man: fix typo in systemctl(1)Michael Biebl
2015-11-22core: allow 'SetUnitProperties()' to run on inactive units tooFranck Bui
'set-property' has been primarly designed to change some properties of *active* units. However it can easily work on inactive units as well. In that case changes are only saved in a drop-in for futur uses and changes will be effective when unit will be started. Actually it already works on inactive units but that was not documented and not fully supported. Indeed the inactive units had to be known by the manager otherwise it was reported as not loaded: $ systemctl status my-test.service * my-test.service - My Testing Unit Loaded: loaded (/etc/systemd/system/my-test.service; static; vendor preset: disabled) Drop-In: /etc/systemd/system/my-test.service.d Active: inactive (dead) $ systemctl set-property my-test.service MemoryLimit=1000000 Failed to set unit properties on my-test.service: Unit my-test.service is not loaded. [ Note: that the unit load state reported by the 'status' command might be confusing since it claimed the unit as loaded but 'set-property' reported the contrary. ] One can possibily workaround this by making the unit a dependency of another active unit so the manager will keep it around: $ systemctl add-wants multi-user.target my-test.service Created symlink from /etc/systemd/system/multi-user.target.wants/my-test.service to /etc/systemd/system/my-test.service. $ systemctl set-property my-test.service MemoryLimit=1000000 $ systemctl status my-test.service * my-test.service - My Testing Unit Loaded: loaded (/etc/systemd/system/my-test.service; enabled; vendor preset: disabled) Drop-In: /etc/systemd/system/my-test.service.d `-50-MemoryLimit.conf Active: inactive (dead) This patch simply forces 'SetUnitProperties()' to load the unit if it's not already the case. It also documents the fact that 'set-property' can be used on inactive units.
2015-11-13Merge pull request #1869 from poettering/kill-overridableMichal Schmidt
Remove support for RequiresOverridable= and RequisiteOverridable=
2015-11-12core: remove support for RequiresOverridable= and RequisiteOverridable=Lennart Poettering
As discussed at systemd.conf 2015 and on also raised on the ML: http://lists.freedesktop.org/archives/systemd-devel/2015-November/034880.html This removes the two XyzOverridable= unit dependencies, that were basically never used, and do not enhance user experience in any way. Most folks looking for the functionality this provides probably opt for the "ignore-dependencies" job mode, and that's probably a good idea. Hence, let's simplify systemd's dependency engine and remove these two dependency types (and their inverses). The unit file parser and the dbus property parser will now redirect the settings/properties to result in an equivalent non-overridable dependency. In the case of the unit file parser we generate a warning, to inform the user. The dbus properties for this unit type stay available on the unit objects, but they are now hidden from usual introspection and will always return the empty list when queried. This should provide enough compatibility for the few unit files that actually ever made use of this.
2015-11-12man: improve the unit file enable state table a bitLennart Poettering
2015-11-12install: follow unit file symlinks in /usr, but not /etc when looking for ↵Lennart Poettering
[Install] data Some distributions use alias unit files via symlinks in /usr to cover for legacy service names. With this change we'll allow "systemctl enable" on such aliases. Previously, our rule was that symlinks are user configuration that "systemctl enable" + "systemctl disable" creates and removes, while unit files is where the instructions to do so are store. As a result of the rule we'd never read install information through symlinks, since that would mix enablement state with installation instructions. Now, the new rule is that only symlinks inside of /etc are configuration. Unit files, and symlinks in /usr are now valid for installation instructions. This patch is quite a rework of the whole install logic, and makes the following addional changes: - Adds a complete test "test-instal-root" that tests the install logic pretty comprehensively. - Never uses canonicalize_file_name(), because that's incompatible with operation relative to a specific root directory. - unit_file_get_state() is reworked to return a proper error, and returns the state in a call-by-ref parameter. This cleans up confusion between the enum type and errno-like errors. - The new logic puts a limit on how long to follow unit file symlinks: it will do so only for 64 steps at max. - The InstallContext object's fields are renamed to will_process and has_processed (will_install and has_installed) since they are also used for deinstallation and all kinds of other operations. - The root directory is always verified before use. - install.c is reordered to place the exported functions together. - Stricter rules are followed when traversing symlinks: the unit suffix must say identical, and it's not allowed to link between regular units and templated units. - Various modernizations - The "invalid" unit file state has been renamed to "bad", in order to avoid confusion between UNIT_FILE_INVALID and _UNIT_FILE_STATE_INVALID. Given that the state should normally not be seen and is not documented this should not be a problematic change. The new name is now documented however. Fixes #1375, #1718, #1706
2015-11-10Remove snapshot unit typeZbigniew Jędrzejewski-Szmek
Snapshots were never useful or used for anything. Many systemd developers that I spoke to at systemd.conf2015, didn't even know they existed, so it is fairly safe to assume that this type can be deleted without harm. The fundamental problem with snapshots is that the state of the system is dynamic, devices come and go, users log in and out, timers fire... and restoring all units to some state from the past would "undo" those changes, which isn't really possible. Tested by creating a snapshot, running the new binary, and checking that the transition did not cause errors, and the snapshot is gone, and snapshots cannot be created anymore. New systemctl says: Unknown operation snapshot. Old systemctl says: Failed to create snapshot: Support for snapshots has been removed. IgnoreOnSnaphost settings are warned about and ignored: Support for option IgnoreOnSnapshot= has been removed and it is ignored http://lists.freedesktop.org/archives/systemd-devel/2015-November/034872.html
2015-11-06doc: correct orthography, word forms and missing/extraneous wordsJan Engelhardt
2015-11-06doc: correct punctuation and improve typography in documentationJan Engelhardt
2015-11-04systemctl: update documentation for --plain optionMark Theunissen
- Existing documentation did not mention that --plain omits the bullets and works on list-units and list-machines.
2015-09-30Merge pull request #1419 from keszybz/shell-completionLennart Poettering
Shell completion tweaks
2015-09-29systemctl: make "systemctl is-system-running" return "offline" if we are not ↵Lennart Poettering
booted with systemd This sounds like the better place to expose this than in "systemd-notify --booted". Also document the so far undocumented "unknown" state the command might return. And rearrange the table of states documented to be more like the one for "is-running". Also, don't document the precise exit code of this function, just say errors are reported != 0 or > 0...
2015-09-28systemctl: add --state=helpZbigniew Jędrzejewski-Szmek
This mirrors --type=help and simplifies completion scripts. The array of states is dense, so the is no need to check if the string is null.
2015-09-21containers: systemd exits with non-zero codeAlban Crequy
When a systemd service running in a container exits with a non-zero code, it can be useful to terminate the container immediately and get the exit code back to the host, when systemd-nspawn returns. This was not possible to do. This patch adds the following to make it possible: - Add a read-only "ExitCode" property on PID 1's "Manager" bus object. By default, it is 0 so the behaviour stays the same as previously. - Add a method "SetExitCode" on the same object. The method fails when called on baremetal: it is only allowed in containers or in user session. - Add support in systemctl to call "systemctl exit 42". It reuses the existing code for user session. - Add exit.target and systemd-exit.service to the system instance. - Change main() to actually call systemd-shutdown to exit() with the correct value. - Add verb 'exit' in systemd-shutdown with parameter --exit-code - Update systemctl manpage. I used the following to test it: | $ sudo rkt --debug --insecure-skip-verify run \ | --mds-register=false --local docker://busybox \ | --exec=/bin/chroot -- /proc/1/root \ | systemctl --force exit 42 | ... | Container rkt-895a0cba-5c66-4fa5-831c-e3f8ddc5810d failed with error code 42. | $ echo $? | 42 Fixes https://github.com/systemd/systemd/issues/1290
2015-09-21core: extend KillUnit() to return error when no unit was killedJan Synacek
2015-09-08systemctl: add ConsistsOf as the inverse of PartOfEvgeny Vereshchagin
2015-08-25logind/systemctl: introduce SetWallMessage and --messageJan Synacek
Enable unprivileged users to set wall message on a shutdown operation. When the message is set via the --message option, it is logged together with the default shutdown message. $ systemctl reboot --message "Applied kernel updates." $ journalctl -b -1 ... systemd-logind[27]: System is rebooting. (Applied kernel updates.) ...
2015-08-05man: update description of --quietZbigniew Jędrzejewski-Szmek
This description should provide the general rule, without listing all the subcommands, which is bound to get out of date too often. https://github.com/systemd/systemd/issues/216