[systemd-devel] [PATCH 4/6] Properly interpret \; token in Unit body (ExecStart)

Oleksii Shevchuk alxchk at gmail.com
Sat Nov 3 12:52:02 PDT 2012


Some shell commands (like) takes ; as separate arg. With current
parser implementation there is no way to pass it -- Or it will be
interpreted as comment, or as \;

Patch adds token \;
---
 src/core/load-fragment.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 5803044..4dc5c52 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -483,6 +483,8 @@ int config_parse_exec(
                 FOREACH_WORD_QUOTED(w, l, rvalue, state) {
                         if (strncmp(w, ";", MAX(l, 1U)) == 0)
                                 break;
+                        else if (strncmp(w, "\\;", MAX(l, 1U)) == 0)
+                                w ++;
 
                         if (honour_argv0 && w == rvalue) {
                                 assert(!path);
-- 
1.7.12.4



More information about the systemd-devel mailing list