El 17/02/15 a las 15:38, Cristian Rodríguez escribió:
HI:

In openSUSE, we have per *running kernel* sysctl snippets, currently
implemented as patch on systemd-sysctl.. I 'm currently attempting to
replace it for something sane..like

d /run/sysctl.d
L    /run/sysctl.d/00-sysctl.conf-%v -    -    -    -
/boot/sysctl.conf-%v

BUt "argument" does not support specifier expasion when dealing with
path names.. would you take patches for this ?

Thanks.



Ok, this patch works for my usecase..



>From 10f9c96bb40834191765bd19f313ab17d18e3b31 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <crrodrig...@opensuse.org>
Date: Tue, 17 Feb 2015 17:34:17 -0300
Subject: [PATCH] tmpfiles: add specifier support for the create symlink
 "argument"

---
 src/tmpfiles/tmpfiles.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index c948d4d..1b35b8e 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -1590,6 +1590,12 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
                         i.argument = strappend("/usr/share/factory/", i.path);
                         if (!i.argument)
                                 return log_oom();
+                } else {
+                    r = specifier_printf(i.argument, specifier_table, NULL, &i.argument);
+                    if (r < 0) {
+                        log_error("[%s:%u] Failed to replace specifiers: %s", fname, line, path);
+                        return r;
+                    }
                 }
                 break;
 
-- 
2.2.2

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to