mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
service: interpret Debian-style X-Interactive LSB header field
This commit is contained in:
parent
eeb7229cba
commit
723c83fd05
@ -599,6 +599,19 @@ static int service_load_sysv_path(Service *s, const char *path) {
|
||||
|
||||
u->meta.description = d;
|
||||
|
||||
} else if (startswith_no_case(t, "X-Interactive:")) {
|
||||
int b;
|
||||
|
||||
if ((b = parse_boolean(strstrip(t+14))) < 0) {
|
||||
log_warning("[%s:%u] Couldn't parse interactive flag. Ignoring.", path, line);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (b)
|
||||
s->exec_context.std_input = EXEC_INPUT_TTY;
|
||||
else
|
||||
s->exec_context.std_input = EXEC_INPUT_NULL;
|
||||
|
||||
} else if (state == LSB_DESCRIPTION) {
|
||||
|
||||
if (startswith(l, "#\t") || startswith(l, "# ")) {
|
||||
|
Loading…
Reference in New Issue
Block a user