service: change default service type to 'simple' since that is the future

This commit is contained in:
Lennart Poettering
2010-06-02 19:17:23 +02:00
parent 2c7c61442e
commit 1f48cf56cb
9 changed files with 4 additions and 12 deletions
+2 -3
View File
@@ -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;
+1 -1
View File
@@ -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,