summaryrefslogtreecommitdiff
path: root/src/core/unit.h
Commit message (Collapse)AuthorAge
...
* core: redefine unit_status_printf()Michal Schmidt2013-02-28
| | | | | | Take advantage of the fact that almost all callers want to pass unit description as the last parameter. Those who don't can use the more flexible manager_status_printf().
* core: add manager_status_printf()Michal Schmidt2013-02-28
| | | | | | | unit_status_printf() checks the state of the manager, not of the unit as such. Move it to manager.c and rename it to manager_status_printf(). Temporarily keep unit_status_printf as a wrapper macro.
* unit: rework resource management APILennart Poettering2013-02-27
| | | | | | | | | This introduces a new static list of known attributes and their special semantics. This means that cgroup attribute values can now be automatically translated from user to kernel notation for command line set settings, too. This also adds proper support for multi-line attributes.
* core: unify kill code of mount, service, socket, swap unitsLennart Poettering2013-01-26
|
* unit: optionally allow making cgroup attribute changes persistentLennart Poettering2013-01-19
|
* core: log USER_UNIT instead of UNIT if in user sessionMirco Tischler2013-01-18
|
* core: add bus API and systemctl commands for altering cgroup parameters ↵Lennart Poettering2013-01-14
| | | | during runtime
* journal: new logging macros to include UNIT=Zbigniew Jędrzejewski-Szmek2013-01-06
| | | | | | | | | | | | | Adding UNIT= to log lines allows them to be shown in 'systemctl status' output, etc. A new set of macros and functions is added. This allows for less verbose notation than using log_struct() explicitly. The set of logging functions is expanded to take a pair of arguments (e.g. "UNIT=" and the RHS) which add an extra line to the structured log entry. This can be used to add macros which add a different identifier later on.
* socket: support socket activation of containersLennart Poettering2012-12-22
|
* timer: recalculate next elapse for calendar timer units when the system ↵Lennart Poettering2012-11-25
| | | | clock is changed
* timer: implement calendar time eventsLennart Poettering2012-11-23
|
* unit-printf: before resolving exec context specifiers check whether the ↵Lennart Poettering2012-09-18
| | | | object actually has an exec context
* unit: split unit_printf() and friends into its own .c fileLennart Poettering2012-09-18
|
* man: fix a bunch of typos in docsThomas Hindoe Paaboel Andersen2012-09-13
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=54501
* systemd: added new dependency PartOfMichal Sekletar2012-07-26
| | | | | | | | | | | | This should address TODO item "new dependency type to "group" services in a target". Semantic of new dependency is as follows. Once configured it creates dependency which will cause that all dependent units get stopped if unit they all depend on is stopped or restarted. Usual use case would be configuring PartOf=some.target in template unit file and WantedBy=some.target in [Install] section and enabling desired number of instances. In this case starting one instance won't pull in target but stopping or starting target(in case of WantedBy is properly configured) will cause stop/start of all instances.
* units: apply default resource limits to socket/mount/swap processes tooLennart Poettering2012-07-20
|
* core: drop KillMode parameter from KillUnit() bus callLennart Poettering2012-07-20
| | | | | | It made no sense, and since we are documenting the bus calls now and want to include them in our stability promise we really should get it cleaned up sooner, not later.
* 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: don't serialize job state, only unit state across switch-rootLennart Poettering2012-07-18
|
* unit: set default working directory to the user's home directory when ↵Lennart Poettering2012-07-16
| | | | running in user mode
* Spelling fixes.Ville Skyttä2012-07-16
|
* unit: avoid re-definition of enum for older gcc versionsKay Sievers2012-07-15
| | | | | <koen> | ./src/shared/unit-name.h:29:23: error: redefinition of typedef 'UnitType' <koen> | ./src/core/unit.h:30:23: note: previous declaration of 'UnitType' was here
* unit: rename BindTo= to BindsTo=Lennart Poettering2012-07-13
| | | | | | | | all other dependencies are in 3rd person. Change BindTo= accordingly to BindsTo=. Of course, the dependency is widely used, hence we parse the old name too for compatibility.
* 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: get rid of UnitVTable.suffix, which is now unusedLennart Poettering2012-07-10
|
* 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.
* units: remove service sysv_path variable and replace it by generic unit_pathLennart Poettering2012-05-22
| | | | | | UnitPath= is also writable via native units and may be used by generators to clarify from which file a unit is generated. This patch also hooks up the cryptsetup and fstab generators to set UnitPath= accordingly.
* units: introduce new Documentation= field and make use of it everywhereLennart Poettering2012-05-21
| | | | | | | | | | This should help making the boot process a bit easier to explore and understand for the administrator. The simple idea is that "systemctl status" now shows a link to documentation alongside the other status and decriptionary information of a service. This patch adds the necessary fields to all our shipped units if we have proper documentation for them.
* unit: unit type dependent status messagesMichal Schmidt2012-05-14
| | | | | | | | | | | | | | | Instead of generic "Starting..." and "Started" messages for all unit use type-dependent messages. For example, mounts will announce "Mounting..." and "Mounted". Add status messages to units of types that used to be entirely silent (automounts, sockets, targets, devices). For unit types whose jobs are instantaneous, report only the job completion, not the starting event. Socket units with non-instantaneous jobs are rare (Exec*= is not used often in socket units), so I chose not to print the starting messages for them either. This will hopefully give people better understanding of the boot.
* unit: add new dependency type RequiresMountsFor=Lennart Poettering2012-04-30
| | | | | | | | RequiresMountsFor= is a shortcut for adding requires and after dependencies to all mount units neeed for the specified paths. This solves a couple of issues regarding dep loop cycles for encrypted swap.
* core: add NOP jobs, job type collapsingMichal Schmidt2012-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two of our current job types are special: JOB_TRY_RESTART, JOB_RELOAD_OR_START. They differ from other job types by being sensitive to the unit active state. They perform some action when the unit is active and some other action otherwise. This raises a question: when exactly should the unit state be checked to make the decision? Currently the unit state is checked when the job becomes runnable. It's more sensible to check the state immediately when the job is added by the user. When the user types "systemctl try-restart foo.service", he really intends to restart the service if it's running right now. If it isn't running right now, the restart is pointless. Consider the example (from Bugzilla[1]): sleep.service takes some time to start. hello.service has After=sleep.service. Both services get started. Two jobs will appear: hello.service/start waiting sleep.service/start running Then someone runs "systemctl try-restart hello.service". Currently the try-restart operation will block and wait for sleep.service/start to complete. The correct result is to complete the try-restart operation immediately with success, because hello.service is not running. The two original jobs must not be disturbed by this. To fix this we introduce two new concepts: - a new job type: JOB_NOP A JOB_NOP job does not do anything to the unit. It does not pull in any dependencies. It is always immediately runnable. When installed to a unit, it sits in a special slot (u->nop_job) where it never conflicts with the installed job (u->job) of a different type. It never merges with jobs of other types, but it can merge into an already installed JOB_NOP job. - "collapsing" of job types When a job of one of the two special types is added, the state of the unit is checked immediately and the job type changes: JOB_TRY_RESTART -> JOB_RESTART or JOB_NOP JOB_RELOAD_OR_START -> JOB_RELOAD or JOB_START Should a job type JOB_RELOAD_OR_START appear later during job merging, it collapses immediately afterwards. Collapsing actually makes some things simpler, because there are now fewer job types that are allowed in the transaction. [1] Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=753586
* job: serialize jobs properlyMichal Schmidt2012-04-24
| | | | | | | | | Jobs were not preserved correctly over a daemon-reload operation. A systemctl process waiting for a job completion received a job removal signal. The job itself changed its id. The job timeout started ticking all over again. This fixes the deficiencies.
* relicense to LGPLv2.1 (with exceptions)Lennart Poettering2012-04-12
| | | | | | | | | | | | | | We finally got the OK from all contributors with non-trivial commits to relicense systemd from GPL2+ to LGPL2.1+. Some udev bits continue to be GPL2+ for now, but we are looking into relicensing them too, to allow free copy/paste of all code within systemd. The bits that used to be MIT continue to be MIT. The big benefit of the relicensing is that closed source code may now link against libsystemd-login.so and friends.
* move libsystemd_core.la sources into core/Kay Sievers2012-04-11