summaryrefslogtreecommitdiff
path: root/src/core/service.c
diff options
context:
space:
mode:
authorMantas Mikulėnas <grawity@gmail.com>2012-10-10 20:18:42 +0300
committerLennart Poettering <lennart@poettering.net>2012-10-16 01:36:18 +0200
commit2abba39d759bacebd7461f7370bb108f48dcce92 (patch)
tree4011d84a2b6136d4d28b905d6830ca8ad4c0505b /src/core/service.c
parent9388e99e208a6487b26dcbda86005ee9eba8d93d (diff)
core: allow Type=oneshot services to have ExecReload
Use cases: * iptables.service – atomically reload rules without having to flush them beforehand (which may leave the system insecure if reload fails) * rpc-nfsd.service – reexport filesystems after /etc/exports update without completely stopping and restarting nfsd (In both cases, the actual service is provided by a kernel module and does not have any associated user-space processes, thus Type=oneshot.)
Diffstat (limited to 'src/core/service.c')
-rw-r--r--src/core/service.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/core/service.c b/src/core/service.c
index 8d315c1f75..69c71508f8 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -1161,12 +1161,6 @@ static int service_verify(Service *s) {
return -EINVAL;
}
- if (s->type == SERVICE_ONESHOT &&
- s->exec_command[SERVICE_EXEC_RELOAD]) {
- log_error("%s has an ExecReload setting, which is not allowed for Type=oneshot services. Refusing.", UNIT(s)->id);
- return -EINVAL;
- }
-
if (s->type == SERVICE_DBUS && !s->bus_name) {
log_error("%s is of type D-Bus but no D-Bus service name has been specified. Refusing.", UNIT(s)->id);
return -EINVAL;