[systemd-commits] src/service.c src/service.h units/emergency.service units/fedora units/gentoo units/getty at .service.m4 units/systemd-initctl.service.in units/systemd-logger.service.in

Lennart Poettering lennart at kemper.freedesktop.org
Wed Jun 2 10:18:07 PDT 2010


 src/service.c                    |    5 ++---
 src/service.h                    |    2 +-
 units/emergency.service          |    3 +--
 units/fedora/prefdm.service      |    1 -
 units/fedora/rc-local.service    |    1 -
 units/gentoo/xdm.service         |    1 -
 units/getty at .service.m4          |    1 -
 units/systemd-initctl.service.in |    1 -
 units/systemd-logger.service.in  |    1 -
 9 files changed, 4 insertions(+), 12 deletions(-)

New commits:
commit 1f48cf56cb2693b84fdc76dc8df0b048ed50ef43
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Jun 2 19:15:42 2010 +0200

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

diff --git a/src/service.c b/src/service.c
index 8ff7b73..2ce95f5 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 40bd57e..5242de5 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,
diff --git a/units/emergency.service b/units/emergency.service
index 3cbca3d..924723f 100644
--- a/units/emergency.service
+++ b/units/emergency.service
@@ -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
diff --git a/units/fedora/prefdm.service b/units/fedora/prefdm.service
index 2919102..3428026 100644
--- a/units/fedora/prefdm.service
+++ b/units/fedora/prefdm.service
@@ -14,4 +14,3 @@ Conflicts=shutdown.target
 
 [Service]
 ExecStart=/etc/X11/prefdm -nodaemon
-Type=simple
diff --git a/units/fedora/rc-local.service b/units/fedora/rc-local.service
index cb07007..bd67aab 100644
--- a/units/fedora/rc-local.service
+++ b/units/fedora/rc-local.service
@@ -17,7 +17,6 @@ Names=rc-local.service local.service
 
 [Service]
 ExecStart=/etc/rc.local start
-Type=simple
 TimeoutSec=0
 StandardInput=tty
 ValidNoProcess=yes
diff --git a/units/gentoo/xdm.service b/units/gentoo/xdm.service
index 8370ef2..ac1df75 100644
--- a/units/gentoo/xdm.service
+++ b/units/gentoo/xdm.service
@@ -14,4 +14,3 @@ Conflicts=shutdown.target
 
 [Service]
 ExecStart=/etc/init.d/xdm start
-Type=simple
diff --git a/units/getty at .service.m4 b/units/getty at .service.m4
index 20ee6e9..1ada4ff 100644
--- a/units/getty at .service.m4
+++ b/units/getty at .service.m4
@@ -18,7 +18,6 @@ Conflicts=shutdown.target
 
 [Service]
 Environment=TERM=linux
-Type=simple
 ExecStart=GETTY %I
 Restart=restart-always
 RestartSec=0
diff --git a/units/systemd-initctl.service.in b/units/systemd-initctl.service.in
index 6c93653..7450e07 100644
--- a/units/systemd-initctl.service.in
+++ b/units/systemd-initctl.service.in
@@ -12,4 +12,3 @@ Description=systemd /dev/initctl Compatibility Daemon
 
 [Service]
 ExecStart=@rootlibexecdir@/systemd-initctl
-Type=simple
diff --git a/units/systemd-logger.service.in b/units/systemd-logger.service.in
index 5fc0532..2004438 100644
--- a/units/systemd-logger.service.in
+++ b/units/systemd-logger.service.in
@@ -13,4 +13,3 @@ After=@SPECIAL_SYSLOG_SERVICE@
 
 [Service]
 ExecStart=@rootlibexecdir@/systemd-logger
-Type=simple


More information about the systemd-commits mailing list