summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-06-02 19:15:42 +0200
committerLennart Poettering <lennart@poettering.net>2010-06-02 19:17:23 +0200
commit1f48cf56cb2693b84fdc76dc8df0b048ed50ef43 (patch)
tree7fd4978d2d11076633a98a8935d8689d0f01dd3e /src
parent2c7c61442e6b46571b1f53db05ef7a23227bebe2 (diff)
service: change default service type to 'simple' since that is the future
Diffstat (limited to 'src')
-rw-r--r--src/service.c5
-rw-r--r--src/service.h2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/service.c b/src/service.c
index 8ff7b73138..2ce95f5a9f 100644
--- a/src/service.c
+++ b/src/service.c
@@ -340,9 +340,6 @@ static int service_load_sysv_path(Service *s, const char *path) {
goto finish;
}
- s->type = SERVICE_FORKING;
- s->restart = SERVICE_ONCE;
-
free(s->sysv_path);
if (!(s->sysv_path = strdup(path))) {
r = -ENOMEM;
@@ -650,8 +647,10 @@ static int service_load_sysv_path(Service *s, const char *path) {
s->timeout_usec = 0;
/* Special setting for all SysV services */
+ s->type = SERVICE_FORKING;
s->valid_no_process = true;
s->kill_mode = KILL_PROCESS_GROUP;
+ s->restart = SERVICE_ONCE;
u->meta.load_state = UNIT_LOADED;
r = 0;
diff --git a/src/service.h b/src/service.h
index 40bd57e256..5242de58fa 100644
--- a/src/service.h
+++ b/src/service.h
@@ -56,8 +56,8 @@ typedef enum ServiceRestart {
} ServiceRestart;
typedef enum ServiceType {
- SERVICE_FORKING, /* forks by itself (i.e. traditional daemons) */
SERVICE_SIMPLE, /* we fork and go on right-away (i.e. modern socket activated daemons) */
+ SERVICE_FORKING, /* forks by itself (i.e. traditional daemons) */
SERVICE_FINISH, /* we fork and wait until the program finishes (i.e. programs like fsck which run and need to finish before we continue) */
SERVICE_DBUS, /* we fork and wait until a specific D-Bus name appears on the bus */
_SERVICE_TYPE_MAX,