summaryrefslogtreecommitdiff
path: root/src/systemctl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-03-04 03:44:43 +0100
committerLennart Poettering <lennart@poettering.net>2011-03-04 03:44:43 +0100
commit8c7be95e5a80c4bd82d86e9640a071fd98618172 (patch)
treef9f8659f93430ed50da2c677dda705d35df24f69 /src/systemctl.c
parent0595f9a1c182a84581749823ef47c5f292e545f9 (diff)
execute: load environment files at time of execution, not when we load the service configuration
https://bugzilla.redhat.com/show_bug.cgi?id=661282
Diffstat (limited to 'src/systemctl.c')
-rw-r--r--src/systemctl.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/systemctl.c b/src/systemctl.c
index 2e8d107367..b733b47c84 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -2370,6 +2370,25 @@ static int print_property(const char *name, DBusMessageIter *iter) {
return 0;
+ } else if (dbus_message_iter_get_element_type(iter) == DBUS_TYPE_STRUCT && streq(name, "EnvironmentFiles")) {
+ DBusMessageIter sub, sub2;
+
+ dbus_message_iter_recurse(iter, &sub);
+ while (dbus_message_iter_get_arg_type(&sub) == DBUS_TYPE_STRUCT) {
+ const char *path;
+ dbus_bool_t ignore;
+
+ dbus_message_iter_recurse(&sub, &sub2);
+
+ if (bus_iter_get_basic_and_next(&sub2, DBUS_TYPE_STRING, &path, true) >= 0 &&
+ bus_iter_get_basic_and_next(&sub2, DBUS_TYPE_BOOLEAN, &ignore, false) >= 0)
+ printf("EnvironmentFile=%s (ignore=%s)\n", path, yes_no(ignore));
+
+ dbus_message_iter_next(&sub);
+ }
+
+ return 0;
+
} else if (dbus_message_iter_get_element_type(iter) == DBUS_TYPE_STRUCT && streq(name, "Paths")) {
DBusMessageIter sub, sub2;