summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-05-24 22:32:09 +0200
committerLennart Poettering <lennart@poettering.net>2010-05-24 22:32:49 +0200
commit723c83fd051e2c3a195251cc0bd1313cb6bcf729 (patch)
tree6c2f82ce1cf59e393e517b636151cfc32cfb75c1 /src
parenteeb7229cba8ef6445a9fc5ca2b0da06453d616af (diff)
service: interpret Debian-style X-Interactive LSB header field
Diffstat (limited to 'src')
-rw-r--r--src/service.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/service.c b/src/service.c
index 3fbc0ac..8ff7b73 100644
--- a/src/service.c
+++ b/src/service.c
@@ -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, "# ")) {