service: change default service type to 'simple' since that is the future
This commit is contained in:
parent
2c7c61442e
commit
1f48cf56cb
|
@ -340,9 +340,6 @@ static int service_load_sysv_path(Service *s, const char *path) {
|
||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
|
|
||||||
s->type = SERVICE_FORKING;
|
|
||||||
s->restart = SERVICE_ONCE;
|
|
||||||
|
|
||||||
free(s->sysv_path);
|
free(s->sysv_path);
|
||||||
if (!(s->sysv_path = strdup(path))) {
|
if (!(s->sysv_path = strdup(path))) {
|
||||||
r = -ENOMEM;
|
r = -ENOMEM;
|
||||||
|
@ -650,8 +647,10 @@ static int service_load_sysv_path(Service *s, const char *path) {
|
||||||
s->timeout_usec = 0;
|
s->timeout_usec = 0;
|
||||||
|
|
||||||
/* Special setting for all SysV services */
|
/* Special setting for all SysV services */
|
||||||
|
s->type = SERVICE_FORKING;
|
||||||
s->valid_no_process = true;
|
s->valid_no_process = true;
|
||||||
s->kill_mode = KILL_PROCESS_GROUP;
|
s->kill_mode = KILL_PROCESS_GROUP;
|
||||||
|
s->restart = SERVICE_ONCE;
|
||||||
|
|
||||||
u->meta.load_state = UNIT_LOADED;
|
u->meta.load_state = UNIT_LOADED;
|
||||||
r = 0;
|
r = 0;
|
||||||
|
|
|
@ -56,8 +56,8 @@ typedef enum ServiceRestart {
|
||||||
} ServiceRestart;
|
} ServiceRestart;
|
||||||
|
|
||||||
typedef enum ServiceType {
|
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_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_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_DBUS, /* we fork and wait until a specific D-Bus name appears on the bus */
|
||||||
_SERVICE_TYPE_MAX,
|
_SERVICE_TYPE_MAX,
|
||||||
|
|
|
@ -12,8 +12,7 @@ Description=Emergency Shell
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/bin/sh
|
ExecStart=/bin/sh
|
||||||
Type=simple
|
|
||||||
StandardInput=tty
|
StandardInput=tty
|
||||||
Restart=restart-always
|
Restart=restart-always
|
||||||
RestartSec=0
|
RestartSec=0
|
||||||
KillMode=process
|
KillMode=process-group
|
||||||
|
|
|
@ -14,4 +14,3 @@ Conflicts=shutdown.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/etc/X11/prefdm -nodaemon
|
ExecStart=/etc/X11/prefdm -nodaemon
|
||||||
Type=simple
|
|
||||||
|
|
|
@ -17,7 +17,6 @@ Names=rc-local.service local.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/etc/rc.local start
|
ExecStart=/etc/rc.local start
|
||||||
Type=simple
|
|
||||||
TimeoutSec=0
|
TimeoutSec=0
|
||||||
StandardInput=tty
|
StandardInput=tty
|
||||||
ValidNoProcess=yes
|
ValidNoProcess=yes
|
||||||
|
|
|
@ -14,4 +14,3 @@ Conflicts=shutdown.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/etc/init.d/xdm start
|
ExecStart=/etc/init.d/xdm start
|
||||||
Type=simple
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ Conflicts=shutdown.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Environment=TERM=linux
|
Environment=TERM=linux
|
||||||
Type=simple
|
|
||||||
ExecStart=GETTY %I
|
ExecStart=GETTY %I
|
||||||
Restart=restart-always
|
Restart=restart-always
|
||||||
RestartSec=0
|
RestartSec=0
|
||||||
|
|
|
@ -12,4 +12,3 @@ Description=systemd /dev/initctl Compatibility Daemon
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=@rootlibexecdir@/systemd-initctl
|
ExecStart=@rootlibexecdir@/systemd-initctl
|
||||||
Type=simple
|
|
||||||
|
|
|
@ -13,4 +13,3 @@ After=@SPECIAL_SYSLOG_SERVICE@
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=@rootlibexecdir@/systemd-logger
|
ExecStart=@rootlibexecdir@/systemd-logger
|
||||||
Type=simple
|
|
||||||
|
|
Loading…
Reference in a new issue