chiark / gitweb /
core: make sure scope attributes survive a reload
authorLennart Poettering <lennart@poettering.net>
Tue, 30 Jul 2013 00:50:44 +0000 (02:50 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 30 Jul 2013 00:54:56 +0000 (02:54 +0200)
src/core/dbus-kill.c
src/core/dbus-scope.c
src/core/load-fragment-gperf.gperf.m4

index beae7da85087d29b72eb7200a227aa5f1252dafd..80e15e3fca8ac42753a3d0602039e3bc4f06333b 100644 (file)
@@ -55,8 +55,11 @@ int bus_kill_context_set_transient_property(
 
                 if (mode != UNIT_CHECK) {
                         dbus_bool_t b;
+
                         dbus_message_iter_get_basic(i, &b);
                         c->send_sighup = b;
+
+                        unit_write_drop_in_format(u, mode, name, "[Scope]\nSendSIGHUP=%s\n", yes_no(b));
                 }
 
                 return 1;
@@ -68,8 +71,11 @@ int bus_kill_context_set_transient_property(
 
                 if (mode != UNIT_CHECK) {
                         dbus_bool_t b;
+
                         dbus_message_iter_get_basic(i, &b);
                         c->send_sigkill = b;
+
+                        unit_write_drop_in_format(u, mode, name, "[Scope]\nSendSIGKILL4=%s\n", yes_no(b));
                 }
 
                 return 1;
index 497e4520d18dfd998ccaea0818e3dab2ce4c154c..783a969fb3438e5c09b8350877db68f78746d0bd 100644 (file)
@@ -138,6 +138,8 @@ static int bus_scope_set_transient_property(
                         dbus_message_iter_get_basic(i, &t);
 
                         s->timeout_stop_usec = t;
+
+                        unit_write_drop_in_format(UNIT(s), mode, name, "[Scope]\nTimeoutStopSec=%lluus\n", (unsigned long long) t);
                 }
 
                 return 1;
index 2b0106ffe2e5c21979fb785f01bed07649cc7681..33c6880b5d803004cb3a2eb71f0f66a2e9ede69c 100644 (file)
@@ -263,6 +263,8 @@ m4_dnl
 CGROUP_CONTEXT_CONFIG_ITEMS(Slice)m4_dnl
 m4_dnl
 CGROUP_CONTEXT_CONFIG_ITEMS(Scope)m4_dnl
+KILL_CONTEXT_CONFIG_ITEMS(Scope)m4_dnl
+Scope.TimeoutStopSec,            config_parse_sec,                   0,                             offsetof(Scope, timeout_stop_usec)
 m4_dnl The [Install] section is ignored here.
 Install.Alias,                   NULL,                               0,                             0
 Install.WantedBy,                NULL,                               0,                             0