]> err.no Git - systemd/commitdiff
service: change default service type to 'simple' since that is the future
authorLennart Poettering <lennart@poettering.net>
Wed, 2 Jun 2010 17:15:42 +0000 (19:15 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 2 Jun 2010 17:17:23 +0000 (19:17 +0200)
src/service.c
src/service.h
units/emergency.service
units/fedora/prefdm.service
units/fedora/rc-local.service
units/gentoo/xdm.service
units/getty@.service.m4
units/systemd-initctl.service.in
units/systemd-logger.service.in

index 8ff7b73138016a9a4ace7991574df55a3c6a57cd..2ce95f5a9f2016e38e619e4aeea405e02db6db15 100644 (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;
index 40bd57e256a4a4ef0295a5c610fb276d4725a9a3..5242de58fa854b07a7cd3125bfdc7f61070f07ef 100644 (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,
index 3cbca3d01267a550bea21d6c2f8f8aad10ea5f8b..924723fefede74b2fe1a98653aa5cf781b4477d7 100644 (file)
@@ -12,8 +12,7 @@ Description=Emergency Shell
 
 [Service]
 ExecStart=/bin/sh
-Type=simple
 StandardInput=tty
 Restart=restart-always
 RestartSec=0
-KillMode=process
+KillMode=process-group
index 291910239fbaeb0efed4b222fffe74fea9853072..3428026c54e30953a973a5c8cb33a54e613db49f 100644 (file)
@@ -14,4 +14,3 @@ Conflicts=shutdown.target
 
 [Service]
 ExecStart=/etc/X11/prefdm -nodaemon
-Type=simple
index cb0700700b1ed4020964046d8dac5dbe0342e83c..bd67aab62e115bbba6c60713384e43d3ebdea9a6 100644 (file)
@@ -17,7 +17,6 @@ Names=rc-local.service local.service
 
 [Service]
 ExecStart=/etc/rc.local start
-Type=simple
 TimeoutSec=0
 StandardInput=tty
 ValidNoProcess=yes
index 8370ef24f8bf1bd9a1b11ad8f5ec48830759c316..ac1df757223daa904c317da82850042e1d132a0f 100644 (file)
@@ -14,4 +14,3 @@ Conflicts=shutdown.target
 
 [Service]
 ExecStart=/etc/init.d/xdm start
-Type=simple
index 20ee6e90f753cf026c94e4342e2f61808e34bc54..1ada4ffd01a2206e1f770acff7affb62518b826b 100644 (file)
@@ -18,7 +18,6 @@ Conflicts=shutdown.target
 
 [Service]
 Environment=TERM=linux
-Type=simple
 ExecStart=GETTY %I
 Restart=restart-always
 RestartSec=0
index 6c9365380809d5a9125584fa31f98870bf252aba..7450e07e61375656a14b3ed05f5167a9f931f7bb 100644 (file)
@@ -12,4 +12,3 @@ Description=systemd /dev/initctl Compatibility Daemon
 
 [Service]
 ExecStart=@rootlibexecdir@/systemd-initctl
-Type=simple
index 5fc0532033e2c7d45951585e70c70f799a4162ae..200443897151e76fc6f1fadbb15aa66607e6e59c 100644 (file)
@@ -13,4 +13,3 @@ After=@SPECIAL_SYSLOG_SERVICE@
 
 [Service]
 ExecStart=@rootlibexecdir@/systemd-logger
-Type=simple