diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-07-30 02:50:44 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-07-30 02:54:56 +0200 |
commit | c3df8d3dde5a032b382b3f59c016c1d0b7741ae8 (patch) | |
tree | fbffc7094f2ae2ab8e8a47250e47e34f3143a1f8 | |
parent | a6c0353b9268d5b780fb7ff05a10cb5031446e5d (diff) |
core: make sure scope attributes survive a reload
-rw-r--r-- | src/core/dbus-kill.c | 6 | ||||
-rw-r--r-- | src/core/dbus-scope.c | 2 | ||||
-rw-r--r-- | src/core/load-fragment-gperf.gperf.m4 | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/src/core/dbus-kill.c b/src/core/dbus-kill.c index beae7da850..80e15e3fca 100644 --- a/src/core/dbus-kill.c +++ b/src/core/dbus-kill.c @@ -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; diff --git a/src/core/dbus-scope.c b/src/core/dbus-scope.c index 497e4520d1..783a969fb3 100644 --- a/src/core/dbus-scope.c +++ b/src/core/dbus-scope.c @@ -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; diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4 index 2b0106ffe2..33c6880b5d 100644 --- a/src/core/load-fragment-gperf.gperf.m4 +++ b/src/core/load-fragment-gperf.gperf.m4 @@ -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 |