chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d0b4880
)
service: rename settings for Restart= from 'restart-always' to 'always' and similar
author
Lennart Poettering
<lennart@poettering.net>
Tue, 5 Oct 2010 18:30:44 +0000
(20:30 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 5 Oct 2010 18:30:44 +0000
(20:30 +0200)
fixme
patch
|
blob
|
history
man/systemd.service.xml
patch
|
blob
|
history
src/service.c
patch
|
blob
|
history
src/service.h
patch
|
blob
|
history
units/emergency.service
patch
|
blob
|
history
units/fedora/prefdm.service
patch
|
blob
|
history
units/fedora/single.service
patch
|
blob
|
history
units/getty@.service.m4
patch
|
blob
|
history
units/serial-getty@.service.m4
patch
|
blob
|
history
diff --git
a/fixme
b/fixme
index 24fb1694e18c1cfd1c2844d242b975382c63b278..fd75631254cecdb9a1b5f520976eefdf03d9ca4d 100644
(file)
--- a/
fixme
+++ b/
fixme
@@
-107,6
+107,8
@@
later:
* enable syslog.socket by default, activating our kmsg bridge
* enable syslog.socket by default, activating our kmsg bridge
+* Restart=on-failure and Restart=on-abort
+
External:
* place /etc/inittab with explaining blurb.
External:
* place /etc/inittab with explaining blurb.
diff --git
a/man/systemd.service.xml
b/man/systemd.service.xml
index 6ab3bc3601d28b69b1a03ee575eede6bf42125ef..d573ec6f96a3721652cc330b3f09eecc98502317 100644
(file)
--- a/
man/systemd.service.xml
+++ b/
man/systemd.service.xml
@@
-428,17
+428,17
@@
<listitem><para>Configures whether the
main service process shall be restarted when
it exists. Takes one of
<listitem><para>Configures whether the
main service process shall be restarted when
it exists. Takes one of
- <option>
once
</option>,
- <option>
restart-
on-success</option> or
- <option>
restart-
always</option>. If
- set to <option>
once
</option> (the
+ <option>
no
</option>,
+ <option>on-success</option> or
+ <option>always</option>. If
+ set to <option>
no
</option> (the
default) the service will not be
restarted when it exits. If set to
default) the service will not be
restarted when it exits. If set to
- <option>
restart-
on-success</option> it
+ <option>on-success</option> it
will be restarted only when it exited
cleanly, i.e. terminated with an exit
code of 0. If set to
will be restarted only when it exited
cleanly, i.e. terminated with an exit
code of 0. If set to
- <option>
restart-
always</option> the
+ <option>always</option> the
service will be restarted regardless
whether it exited cleanly or not, or
got terminated abnormally by a
service will be restarted regardless
whether it exited cleanly or not, or
got terminated abnormally by a
diff --git
a/src/service.c
b/src/service.c
index 301633ec7eed76e291366f06b672b69381a1325d..116e539d951df7303039759645589b54b0e49342 100644
(file)
--- a/
src/service.c
+++ b/
src/service.c
@@
-795,7
+795,7
@@
static int service_load_sysv_path(Service *s, const char *path) {
/* Special setting for all SysV services */
s->type = SERVICE_FORKING;
s->remain_after_exit = true;
/* Special setting for all SysV services */
s->type = SERVICE_FORKING;
s->remain_after_exit = true;
- s->restart = SERVICE_
ONCE
;
+ s->restart = SERVICE_
RESTART_NO
;
s->exec_context.std_output =
(s->meta.manager->sysv_console || s->exec_context.std_input == EXEC_INPUT_TTY)
? EXEC_OUTPUT_TTY : EXEC_OUTPUT_NULL;
s->exec_context.std_output =
(s->meta.manager->sysv_console || s->exec_context.std_input == EXEC_INPUT_TTY)
? EXEC_OUTPUT_TTY : EXEC_OUTPUT_NULL;
@@
-3109,9
+3109,9
@@
static const char* const service_state_table[_SERVICE_STATE_MAX] = {
DEFINE_STRING_TABLE_LOOKUP(service_state, ServiceState);
static const char* const service_restart_table[_SERVICE_RESTART_MAX] = {
DEFINE_STRING_TABLE_LOOKUP(service_state, ServiceState);
static const char* const service_restart_table[_SERVICE_RESTART_MAX] = {
- [SERVICE_
ONCE] = "once
",
- [SERVICE_RESTART_ON_SUCCESS] = "
restart-
on-success",
- [SERVICE_RESTART_ALWAYS] = "
restart-
always",
+ [SERVICE_
RESTART_NO] = "no
",
+ [SERVICE_RESTART_ON_SUCCESS] = "on-success",
+ [SERVICE_RESTART_ALWAYS] = "always",
};
DEFINE_STRING_TABLE_LOOKUP(service_restart, ServiceRestart);
};
DEFINE_STRING_TABLE_LOOKUP(service_restart, ServiceRestart);
diff --git
a/src/service.h
b/src/service.h
index e2b11db6716a9cb37328cf43b2faba3bafe690be..f47346702f54634cceda131cd1c71d98427dad75 100644
(file)
--- a/
src/service.h
+++ b/
src/service.h
@@
-48,7
+48,7
@@
typedef enum ServiceState {
} ServiceState;
typedef enum ServiceRestart {
} ServiceState;
typedef enum ServiceRestart {
- SERVICE_
ONCE
,
+ SERVICE_
RESTART_NO
,
SERVICE_RESTART_ON_SUCCESS,
SERVICE_RESTART_ALWAYS,
_SERVICE_RESTART_MAX,
SERVICE_RESTART_ON_SUCCESS,
SERVICE_RESTART_ALWAYS,
_SERVICE_RESTART_MAX,
diff --git
a/units/emergency.service
b/units/emergency.service
index 8e378482c1ba41f977eaaedd99c4c2950fa2e7ba..8578654d88611b6e68da3393c58919dd39c5a80a 100644
(file)
--- a/
units/emergency.service
+++ b/
units/emergency.service
@@
-18,7
+18,7
@@
ExecStartPre=-/bin/plymouth --hide-splash
ExecStartPre=-/bin/echo 'Welcome to emergency mode. Use "systemctl default" to activate default mode.'
ExecStart=-/sbin/sulogin
StandardInput=tty-force
ExecStartPre=-/bin/echo 'Welcome to emergency mode. Use "systemctl default" to activate default mode.'
ExecStart=-/sbin/sulogin
StandardInput=tty-force
-Restart=
restart-
always
+Restart=always
RestartSec=0
KillMode=process-group
RestartSec=0
KillMode=process-group
diff --git
a/units/fedora/prefdm.service
b/units/fedora/prefdm.service
index efb83fef673c9509971dc0e760652fcc9e141ec9..32ceb9aa8ffa9cacfa2e4536767f91bdc1b8f185 100644
(file)
--- a/
units/fedora/prefdm.service
+++ b/
units/fedora/prefdm.service
@@
-16,7
+16,7
@@
After=getty@tty1.service plymouth-quit.service
[Service]
ExecStart=/etc/X11/prefdm -nodaemon
[Service]
ExecStart=/etc/X11/prefdm -nodaemon
-Restart=
restart-
always
+Restart=always
RestartSec=0
[Install]
RestartSec=0
[Install]
diff --git
a/units/fedora/single.service
b/units/fedora/single.service
index 6afc8b358d93e0e8ea99079210ce43751bf4841d..a519ae3d6304d9a87c6ea9f0f270188988f064b1 100644
(file)
--- a/
units/fedora/single.service
+++ b/
units/fedora/single.service
@@
-21,7
+21,7
@@
ExecStartPre=-/bin/plymouth --hide-splash
ExecStartPre=-/bin/echo 'Welcome to rescue mode. Use "systemctl default" to activate default mode.'
ExecStart=-/sbin/sulogin
StandardInput=tty-force
ExecStartPre=-/bin/echo 'Welcome to rescue mode. Use "systemctl default" to activate default mode.'
ExecStart=-/sbin/sulogin
StandardInput=tty-force
-Restart=
restart-
always
+Restart=always
RestartSec=0
KillMode=process-group
RestartSec=0
KillMode=process-group
diff --git
a/units/getty@.service.m4
b/units/getty@.service.m4
index 4b65d5b9062a3e1f0f49ee54ed29f7e182d16a3a..8df77c701c57832bcf211d6958ad5b32476b652a 100644
(file)
--- a/
units/getty@.service.m4
+++ b/
units/getty@.service.m4
@@
-31,7
+31,7
@@
Before=getty.target
[Service]
Environment=TERM=linux
ExecStart=-GETTY %I
[Service]
Environment=TERM=linux
ExecStart=-GETTY %I
-Restart=
restart-
always
+Restart=always
RestartSec=0
KillMode=process-group
RestartSec=0
KillMode=process-group
diff --git
a/units/serial-getty@.service.m4
b/units/serial-getty@.service.m4
index b91ed98330bad596faf42fc6e9808c89a179dd6d..baf2eca10c7c19d6d6b362ca63573ae7141ebda8 100644
(file)
--- a/
units/serial-getty@.service.m4
+++ b/
units/serial-getty@.service.m4
@@
-28,7
+28,7
@@
m4_ifdef(`TARGET_FEDORA',
ExecStartPre=-/sbin/securetty %I
)m4_dnl
ExecStart=-/sbin/agetty -s %I 115200,38400,9600
ExecStartPre=-/sbin/securetty %I
)m4_dnl
ExecStart=-/sbin/agetty -s %I 115200,38400,9600
-Restart=
restart-
always
+Restart=always
RestartSec=0
KillMode=process-group
RestartSec=0
KillMode=process-group