[systemd-commits] 3 commits - TODO man/systemd.service.xml src/core units/systemd-hostnamed.service.in units/systemd-localed.service.in units/systemd-logind.service.in units/systemd-timedated.service.in
Lennart Poettering
lennart at kemper.freedesktop.org
Thu May 3 05:54:48 PDT 2012
TODO | 4 ++++
man/systemd.service.xml | 9 ++++++---
src/core/service.c | 7 +++++++
units/systemd-hostnamed.service.in | 1 -
units/systemd-localed.service.in | 1 -
units/systemd-logind.service.in | 1 -
units/systemd-timedated.service.in | 1 -
7 files changed, 17 insertions(+), 7 deletions(-)
New commits:
commit c3743399163c2bd615800c118e97bd8dedbb9c98
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu May 3 14:48:35 2012 +0200
units: explicit Type=dbus is now redundant
diff --git a/units/systemd-hostnamed.service.in b/units/systemd-hostnamed.service.in
index 1ed942f..a9a9913 100644
--- a/units/systemd-hostnamed.service.in
+++ b/units/systemd-hostnamed.service.in
@@ -12,6 +12,5 @@ Description=Hostname Service
[Service]
ExecStart=@rootlibexecdir@/systemd-hostnamed
-Type=dbus
BusName=org.freedesktop.hostname1
CapabilityBoundingSet=CAP_SYS_ADMIN
diff --git a/units/systemd-localed.service.in b/units/systemd-localed.service.in
index ae94bee..763d290 100644
--- a/units/systemd-localed.service.in
+++ b/units/systemd-localed.service.in
@@ -12,6 +12,5 @@ Description=Locale Service
[Service]
ExecStart=@rootlibexecdir@/systemd-localed
-Type=dbus
BusName=org.freedesktop.locale1
CapabilityBoundingSet=
diff --git a/units/systemd-logind.service.in b/units/systemd-logind.service.in
index a16bc81..f244761 100644
--- a/units/systemd-logind.service.in
+++ b/units/systemd-logind.service.in
@@ -13,7 +13,6 @@ After=nss-user-lookup.target
[Service]
ExecStart=@rootlibexecdir@/systemd-logind
-Type=dbus
BusName=org.freedesktop.login1
CapabilityBoundingSet=CAP_AUDIT_CONTROL CAP_CHOWN CAP_KILL CAP_DAC_READ_SEARCH CAP_DAC_OVERRIDE CAP_FOWNER CAP_SYS_TTY_CONFIG
diff --git a/units/systemd-timedated.service.in b/units/systemd-timedated.service.in
index 4073de5..0122283 100644
--- a/units/systemd-timedated.service.in
+++ b/units/systemd-timedated.service.in
@@ -12,6 +12,5 @@ Description=Time & Date Service
[Service]
ExecStart=@rootlibexecdir@/systemd-timedated
-Type=dbus
BusName=org.freedesktop.timedate1
CapabilityBoundingSet=CAP_SYS_TIME
commit 0b86feac50be53f278fa4f47024335cc8c20cc24
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu May 3 14:46:29 2012 +0200
service: default to Type=dbus if BusName= is specified
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index 1551d0d..11f98c3 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -126,8 +126,9 @@
<para>If set to
<option>simple</option> (the default
- value) it is expected that the process
- configured with
+ value if <varname>BusName=</varname>
+ is not specified) it is expected that
+ the process configured with
<varname>ExecStart=</varname> is the
main process of the service. In this
mode, if the process offers
@@ -182,7 +183,9 @@
option configured implicitly gain
dependencies on the
<filename>dbus.socket</filename>
- unit.</para>
+ unit. This type is the default if
+ <varname>BusName=</varname> is
+ specified.</para>
<para>Behaviour of
<option>notify</option> is similar to
diff --git a/src/core/service.c b/src/core/service.c
index a99e1c3..02d1aa8 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -115,6 +115,7 @@ static void service_init(Unit *u) {
s->timeout_usec = DEFAULT_TIMEOUT_USEC;
s->restart_usec = DEFAULT_RESTART_USEC;
+ s->type = _SERVICE_TYPE_INVALID;
s->watchdog_watch.type = WATCH_INVALID;
@@ -1216,6 +1217,9 @@ static int service_load(Unit *u) {
/* This is a new unit? Then let's add in some extras */
if (u->load_state == UNIT_LOADED) {
+ if (s->type == _SERVICE_TYPE_INVALID)
+ s->type = s->bus_name ? SERVICE_DBUS : SERVICE_SIMPLE;
+
service_fix_output(s);
if ((r = unit_add_exec_dependencies(u, &s->exec_context)) < 0)
commit 7e2668c6fd5720ae4d2d55eb8a062739687516af
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu May 3 14:42:49 2012 +0200
service: warn if a dbus name is specified but the service type is not dbus
diff --git a/TODO b/TODO
index 22bcb3f..0810f37 100644
--- a/TODO
+++ b/TODO
@@ -23,6 +23,10 @@ Bugfixes:
Features:
+* don't delete /tmp/systemd-namespace-* before a process is gone down
+
+* don't delete /run/users/lennart if lennart is still logged in even if aging is used
+
* automount: implement expire
* vconsole: implement setterm -store -foreground xxx --background zzz
diff --git a/src/core/service.c b/src/core/service.c
index 4358a94..a99e1c3 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -1135,6 +1135,9 @@ static int service_verify(Service *s) {
return -EINVAL;
}
+ if (s->bus_name && s->type != SERVICE_DBUS)
+ log_warning("%s has a D-Bus service name specified, but is not of type dbus. Ignoring.", UNIT(s)->id);
+
if (s->exec_context.pam_name && s->exec_context.kill_mode != KILL_CONTROL_GROUP) {
log_error("%s has PAM enabled. Kill mode must be set to 'control-group'. Refusing.", UNIT(s)->id);
return -EINVAL;
More information about the systemd-commits
mailing list