mirror of
https://github.com/systemd/systemd.git
synced 2025-02-01 09:47:35 +03:00
service: rename settings for Restart= from 'restart-always' to 'always' and similar
This commit is contained in:
parent
d0b4880988
commit
525ee6f4a1
2
fixme
2
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:
|
External:
|
||||||
|
|
||||||
* place /etc/inittab with explaining blurb.
|
* place /etc/inittab with explaining blurb.
|
||||||
|
@ -428,17 +428,17 @@
|
|||||||
<listitem><para>Configures whether the
|
<listitem><para>Configures whether the
|
||||||
main service process shall be restarted when
|
main service process shall be restarted when
|
||||||
it exists. Takes one of
|
it exists. Takes one of
|
||||||
<option>once</option>,
|
<option>no</option>,
|
||||||
<option>restart-on-success</option> or
|
<option>on-success</option> or
|
||||||
<option>restart-always</option>. If
|
<option>always</option>. If
|
||||||
set to <option>once</option> (the
|
set to <option>no</option> (the
|
||||||
default) the service will not be
|
default) the service will not be
|
||||||
restarted when it exits. If set to
|
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
|
will be restarted only when it exited
|
||||||
cleanly, i.e. terminated with an exit
|
cleanly, i.e. terminated with an exit
|
||||||
code of 0. If set to
|
code of 0. If set to
|
||||||
<option>restart-always</option> the
|
<option>always</option> the
|
||||||
service will be restarted regardless
|
service will be restarted regardless
|
||||||
whether it exited cleanly or not, or
|
whether it exited cleanly or not, or
|
||||||
got terminated abnormally by a
|
got terminated abnormally by a
|
||||||
|
@ -795,7 +795,7 @@ static int service_load_sysv_path(Service *s, const char *path) {
|
|||||||
/* Special setting for all SysV services */
|
/* Special setting for all SysV services */
|
||||||
s->type = SERVICE_FORKING;
|
s->type = SERVICE_FORKING;
|
||||||
s->remain_after_exit = true;
|
s->remain_after_exit = true;
|
||||||
s->restart = SERVICE_ONCE;
|
s->restart = SERVICE_RESTART_NO;
|
||||||
s->exec_context.std_output =
|
s->exec_context.std_output =
|
||||||
(s->meta.manager->sysv_console || s->exec_context.std_input == EXEC_INPUT_TTY)
|
(s->meta.manager->sysv_console || s->exec_context.std_input == EXEC_INPUT_TTY)
|
||||||
? EXEC_OUTPUT_TTY : EXEC_OUTPUT_NULL;
|
? 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);
|
DEFINE_STRING_TABLE_LOOKUP(service_state, ServiceState);
|
||||||
|
|
||||||
static const char* const service_restart_table[_SERVICE_RESTART_MAX] = {
|
static const char* const service_restart_table[_SERVICE_RESTART_MAX] = {
|
||||||
[SERVICE_ONCE] = "once",
|
[SERVICE_RESTART_NO] = "no",
|
||||||
[SERVICE_RESTART_ON_SUCCESS] = "restart-on-success",
|
[SERVICE_RESTART_ON_SUCCESS] = "on-success",
|
||||||
[SERVICE_RESTART_ALWAYS] = "restart-always",
|
[SERVICE_RESTART_ALWAYS] = "always",
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_STRING_TABLE_LOOKUP(service_restart, ServiceRestart);
|
DEFINE_STRING_TABLE_LOOKUP(service_restart, ServiceRestart);
|
||||||
|
@ -48,7 +48,7 @@ typedef enum ServiceState {
|
|||||||
} ServiceState;
|
} ServiceState;
|
||||||
|
|
||||||
typedef enum ServiceRestart {
|
typedef enum ServiceRestart {
|
||||||
SERVICE_ONCE,
|
SERVICE_RESTART_NO,
|
||||||
SERVICE_RESTART_ON_SUCCESS,
|
SERVICE_RESTART_ON_SUCCESS,
|
||||||
SERVICE_RESTART_ALWAYS,
|
SERVICE_RESTART_ALWAYS,
|
||||||
_SERVICE_RESTART_MAX,
|
_SERVICE_RESTART_MAX,
|
||||||
|
@ -18,7 +18,7 @@ ExecStartPre=-/bin/plymouth --hide-splash
|
|||||||
ExecStartPre=-/bin/echo 'Welcome to emergency mode. Use "systemctl default" to activate default mode.'
|
ExecStartPre=-/bin/echo 'Welcome to emergency mode. Use "systemctl default" to activate default mode.'
|
||||||
ExecStart=-/sbin/sulogin
|
ExecStart=-/sbin/sulogin
|
||||||
StandardInput=tty-force
|
StandardInput=tty-force
|
||||||
Restart=restart-always
|
Restart=always
|
||||||
RestartSec=0
|
RestartSec=0
|
||||||
KillMode=process-group
|
KillMode=process-group
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ After=getty@tty1.service plymouth-quit.service
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/etc/X11/prefdm -nodaemon
|
ExecStart=/etc/X11/prefdm -nodaemon
|
||||||
Restart=restart-always
|
Restart=always
|
||||||
RestartSec=0
|
RestartSec=0
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
@ -21,7 +21,7 @@ ExecStartPre=-/bin/plymouth --hide-splash
|
|||||||
ExecStartPre=-/bin/echo 'Welcome to rescue mode. Use "systemctl default" to activate default mode.'
|
ExecStartPre=-/bin/echo 'Welcome to rescue mode. Use "systemctl default" to activate default mode.'
|
||||||
ExecStart=-/sbin/sulogin
|
ExecStart=-/sbin/sulogin
|
||||||
StandardInput=tty-force
|
StandardInput=tty-force
|
||||||
Restart=restart-always
|
Restart=always
|
||||||
RestartSec=0
|
RestartSec=0
|
||||||
KillMode=process-group
|
KillMode=process-group
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ Before=getty.target
|
|||||||
[Service]
|
[Service]
|
||||||
Environment=TERM=linux
|
Environment=TERM=linux
|
||||||
ExecStart=-GETTY %I
|
ExecStart=-GETTY %I
|
||||||
Restart=restart-always
|
Restart=always
|
||||||
RestartSec=0
|
RestartSec=0
|
||||||
KillMode=process-group
|
KillMode=process-group
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ m4_ifdef(`TARGET_FEDORA',
|
|||||||
ExecStartPre=-/sbin/securetty %I
|
ExecStartPre=-/sbin/securetty %I
|
||||||
)m4_dnl
|
)m4_dnl
|
||||||
ExecStart=-/sbin/agetty -s %I 115200,38400,9600
|
ExecStart=-/sbin/agetty -s %I 115200,38400,9600
|
||||||
Restart=restart-always
|
Restart=always
|
||||||
RestartSec=0
|
RestartSec=0
|
||||||
KillMode=process-group
|
KillMode=process-group
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user