summaryrefslogtreecommitdiffstats
path: root/src/core/dbus-kill.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-02-05 02:02:00 +0100
committerLennart Poettering <lennart@poettering.net>2014-02-05 02:03:10 +0100
commitc7040b5d1c2c148f12b6a5eef3dfce1661805131 (patch)
treedc82be22b8c2ee12913b6723ddf148f8fadeb917 /src/core/dbus-kill.c
parentAdded attribute support for sd-rtnl (diff)
downloadsystemd-c7040b5d1c2c148f12b6a5eef3dfce1661805131.tar.xz
systemd-c7040b5d1c2c148f12b6a5eef3dfce1661805131.zip
core: allow User=, Group=, Nice=, Environment=, Type= to be passed when creating a transient service
Diffstat (limited to 'src/core/dbus-kill.c')
-rw-r--r--src/core/dbus-kill.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/dbus-kill.c b/src/core/dbus-kill.c
index 8d3e149f33..f3cfb226e8 100644
--- a/src/core/dbus-kill.c
+++ b/src/core/dbus-kill.c
@@ -70,6 +70,24 @@ int bus_kill_context_set_transient_property(
return 1;
+ } else if (streq(name, "KillSignal")) {
+ int sig;
+
+ r = sd_bus_message_read(message, "i", &sig);
+ if (r < 0)
+ return r;
+
+ if (sig <= 0 || sig >= _NSIG)
+ return sd_bus_error_setf(error, "Signal %i out of range", sig);
+
+ if (mode != UNIT_CHECK) {
+ c->kill_signal = sig;
+
+ unit_write_drop_in_private_format(u, mode, name, "KillSignal=%s\n", signal_to_string(sig));
+ }
+
+ return 1;
+
} else if (streq(name, "SendSIGHUP")) {
int b;