summaryrefslogtreecommitdiff
path: root/src/shared/unit-name.h
Commit message (Collapse)AuthorAge
* systemctl: append default suffix only if none presentZbigniew Jędrzejewski-Szmek2014-11-28
| | | | | | | | Simplify unit_name_mangle() and unit_name_mangle_with_suffix() to always behave the same, and only append a suffix if there is no type suffix. If a user says 'isolate blah.device' it is better to return an error that the type cannot be isolated, than to try to isolate blah.device.target.
* unit: move UnitDependency to unit-nameLukas Nykryn2014-10-08
|
* Use enums to make it obvious what boolean params meanZbigniew Jędrzejewski-Szmek2013-12-26
| | | | Suggested-by: Russ Allbery <rra@debian.org>
* systemctl: allow globbing in commands which take multiple unit namesZbigniew Jędrzejewski-Szmek2013-12-26
|
* bus: add .busname unit type to implement kdbus-style bus activationLennart Poettering2013-12-02
|
* logind: port over to use scopes+slices for all cgroup stuffLennart Poettering2013-07-02
| | | | | | | | | In order to prepare things for the single-writer cgroup scheme, let's make logind use systemd's own primitives for cgroup management. Every login user now gets his own private slice unit, in which his sessions live in a scope unit each. Also, add user@$UID.service to the same slice, and implicitly start it on first login.
* core: split out unit bus path unescaping into unit_name_from_dbus_path()Lennart Poettering2013-07-02
|
* core: add new "scope" unit type for making a unit of pre-existing processesLennart Poettering2013-07-01
| | | | | | | | | | | | | | | | | "Scope" units are very much like service units, however with the difference that they are created from pre-existing processes, rather than processes that systemd itself forks off. This means they are generated programmatically via the bus API as transient units rather than from static configuration read from disk. Also, they do not provide execution-time parameters, as at the time systemd adds the processes to the scope unit they already exist and the parameters cannot be applied anymore. The primary benefit of this new unit type is to create arbitrary cgroups for worker-processes forked off an existing service. This commit also adds a a new mode to "systemd-run" to run the specified processes in a scope rather then a transient service.
* core: add transient unitsLennart Poettering2013-06-28
| | | | | | | | | | | | | | | | | | Transient units can be created via the bus API. They are configured via the method call parameters rather than on-disk files. They are subject to normal GC. Transient units currently may only be created for services (however, we will extend this), and currently only ExecStart= and the cgroup parameters can be configured (also to be extended). Transient units require a unique name, that previously had no configuration file on disk. A tool systemd-run is added that makes use of this functionality to run arbitrary command lines as transient services: $ systemd-run /bin/ping www.heise.de Will cause systemd to create a new transient service and run ping in it.
* core: add new .slice unit type for partitioning systemsLennart Poettering2013-06-17
| | | | | | | | | | | | In order to prepare for the kernel cgroup rework, let's introduce a new unit type to systemd, the "slice". Slices can be arranged in a tree and are useful to partition resources freely and hierarchally by the user. Each service unit can now be assigned to one of these slices, and later on login users and machines may too. Slices translate pretty directly to the cgroup hierarchy, and the various objects can be assigned to any of the slices in the tree.
* Add __attribute__((const, pure, format)) in various placesZbigniew Jędrzejewski-Szmek2013-05-02
| | | | | | | | I'm assuming that it's fine if a _const_ or _pure_ function calls assert. It is assumed that the assert won't trigger, and even if it does, it can only trigger on the first call with a given set of parameters, and we don't care if the compiler moves the order of calls.
* unit: no need to export variables if we can avoid itLennart Poettering2013-03-30
|
* systemctl: be smarter when mangling snapshot namesLennart Poettering2013-01-14
| | | | | | | For "systemctl snapshot" it makes no sense to complete an incomplete name with ".service" as we previously did, use ".snapshot" instead. Also, don't bother with mount units or suchlike, we know that this must be a snapshot and hence is the only sane way for completion.
* systemctl: add help for --type/-tZbigniew Jędrzejewski-Szmek2012-11-15
| | | | | The list of types and load states if lengthy, so a little reminder can be sometimes useful.
* systemd: enable/disable instances of templateMichal Sekletar2012-07-26
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=752774
* use #pragma once instead of foo*foo #define guardsShawn Landden2012-07-19
| | | | | | | | | | | | | | | | | #pragma once has been "un-deprecated" in gcc since 3.3, and is widely supported in other compilers. I've been using and maintaining (rebasing) this patch for a while now, as it annoyed me to see #ifndef fooblahfoo, etc all over the place, almost arrogant about the annoyance of having to define all these names to perform a commen but neccicary functionality, when a completely superior alternative exists. I havn't sent it till now, cause its kindof a style change, and it is bad voodoo to mess with style that has been established by more established editors. So feel free to lambast me as a crazy bafoon. v2 - preserve externally used headers
* unit: Move UnitLoadState definitions from core/unit.c to shared/unit-name.cZbigniew Jędrzejewski-Szmek2012-07-10
| | | | | This makes it possible to use them from systemctl without linking against the core.
* unit-name: remove unit_name_is_valid_no_type() and move unit_name_is_valid() ↵Lennart Poettering2012-07-10
| | | | to unit-name.h
* unit: Move UnitType definitions from core/unit.c to shared/unit-name.cZbigniew Jędrzejewski-Szmek2012-07-10
| | | | | This makes it possible to use them from systemctl without linking against the core. A string->enum lookup table is added.
* cryptsetup: fix escaping when generating cryptsetup unitsLennart Poettering2012-06-25
|
* systemctl: automatically turn paths and unescaped unit names into proper ↵Lennart Poettering2012-06-22
| | | | | | | | | | | | | | | | | unit names This makes sure that systemctl status /home is implicitly translated to: systemctl status /home.mount Similar, /dev/foobar becomes dev-foobar.device. Also, all characters that cannot be part of a unit name are implicitly escaped.
* unit-name: introduce unit_dbus_path_from_name()Michal Schmidt2012-06-13
| | | | | Use the same function in core and in systemctl. get_unit_path() in systemctl becomes unnecessary.
* move more common files to shared/ and add them to shared.laKay Sievers2012-04-12