summaryrefslogtreecommitdiff
path: root/src/core/load-fragment.c
diff options
context:
space:
mode:
authorUmut Tezduyar <umut@tezduyar.com>2013-06-09 07:08:46 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-06-20 16:27:45 -0400
commit97d0e5f83ba4dd713170f802b90149b7325bc992 (patch)
tree21bd3c2a72f7d2c352513f1ceaf6ca0505889a4c /src/core/load-fragment.c
parent8c1396b1c2dfecbb59af61064f6a0f624385004d (diff)
manager: add DefaultEnvironment option
This complements existing functionality of setting variables through 'systemctl set-environment', the kernel command line, and through normal environment variables for systemd in session mode.
Diffstat (limited to 'src/core/load-fragment.c')
-rw-r--r--src/core/load-fragment.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 4a835b6e8b..15fabe860e 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -1564,7 +1564,7 @@ int config_parse_environ(const char *unit,
assert(filename);
assert(lvalue);
assert(rvalue);
- assert(u);
+ assert(data);
if (isempty(rvalue)) {
/* Empty assignment resets the list */
@@ -1573,7 +1573,11 @@ int config_parse_environ(const char *unit,
return 0;
}
- k = unit_full_printf(u, rvalue);
+ if (u)
+ k = unit_full_printf(u, rvalue);
+ else
+ k = strdup(rvalue);
+
if (!k)
return log_oom();