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:
eeb7229
)
service: interpret Debian-style X-Interactive LSB header field
author
Lennart Poettering
<lennart@poettering.net>
Mon, 24 May 2010 20:32:09 +0000
(22:32 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 24 May 2010 20:32:49 +0000
(22:32 +0200)
src/service.c
patch
|
blob
|
history
diff --git
a/src/service.c
b/src/service.c
index 3fbc0acda14b66f0f40f37e5f42572000cef7424..8ff7b73138016a9a4ace7991574df55a3c6a57cd 100644
(file)
--- 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;
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, "# ")) {
} else if (state == LSB_DESCRIPTION) {
if (startswith(l, "#\t") || startswith(l, "# ")) {