summaryrefslogtreecommitdiff
path: root/src/shared/unit-name.c
Commit message (Collapse)AuthorAge
* 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
|
* bus: add API calls to escape string components of objects pathsLennart Poettering2013-11-21
|
* unit-name: when escaping a path consider the empty path identical to the ↵Lennart Poettering2013-09-26
| | | | root dir
* Verify validity of session name when received from outsideZbigniew Jędrzejewski-Szmek2013-09-16
| | | | Only ASCII letters and digits are allowed.
* 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.
* logind: add infrastructure to keep track of machines, and move to slicesLennart Poettering2013-06-20
| | | | | | | | | | | | | | | | | | | | - This changes all logind cgroup objects to use slice objects rather than fixed croup locations. - logind can now collect minimal information about running VMs/containers. As fixed cgroup locations can no longer be used we need an entity that keeps track of machine cgroups in whatever slice they might be located. Since logind already keeps track of users, sessions and seats this is a trivial addition. - nspawn will now register with logind and pass various bits of metadata along. A new option "--slice=" has been added to place the container in a specific slice. - loginctl gained commands to list, introspect and terminate machines. - user.slice and machine.slice will now be pulled in by logind.service, since only logind.service requires this slice.
* 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.
* 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.
* systemctl: append .service when unit does not have valid suffixLukas Nykryn2012-10-16
| | | | | systemctl status a and systemctl status a.service lead to same output but systemctl status a.b and systemctl status a.b.service do not.
* util: various additional modernizationsLennart Poettering2012-09-14
|
* unit-name: rework unit_name_replace_instance function()Lennart Poettering2012-09-12
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=855863
* systemctl: append .service to unit names lacking suffixLennart Poettering2012-07-28
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=39386
* unit-name: style fix in unit_name_is_template()Michal Schmidt2012-07-26
| | | | to make it look like the newly added unit_name_is_instance()
* systemd: enable/disable instances of templateMichal Sekletar2012-07-26
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=752774
* util: rename join() to strjoin()Lennart Poettering2012-07-13
| | | | This is to match strappend() and the other string related functions.
* 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.
* unit-name: never create a unit name with a leading '.'Kay Sievers2012-06-04
| | | | | | | | | | | | Supposed to prevent creating unit files like:   ├── dev-sda1.device.wants   │   └── .dot.mount -> /run/systemd/generator/.dot.mount   ├── .dot.mount from: # cat /etc/fstab /dev/sda1 /.dot vfat ro 1 3 which we later skip reading because of the leading '.'.
* util: split-out path-util.[ch]Kay Sievers2012-05-08
|
* move more common files to shared/ and add them to shared.laKay Sievers2012-04-12