diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-01-22 17:28:59 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-01-22 17:28:59 +0100 |
commit | a9eb840583ad113c3e06cbf1ad4f7c7aaba22732 (patch) | |
tree | 6b7c767af766cec8a785f0b53accc45e79feefaa /src | |
parent | e14c67d046a6d28dca289bda415ac071f2dbfa07 (diff) | |
parent | 1e524ec6e2031629fec27906423619e3403b2f3e (diff) |
Merge pull request #2410 from dobyrch/master
systemctl: Allow 'edit' and 'cat' on unloaded units
Diffstat (limited to 'src')
-rw-r--r-- | src/systemctl/systemctl.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index d021d30f78..0199f28eba 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -2325,42 +2325,12 @@ static int unit_find_paths( if (!install_client_side() && !unit_name_is_valid(unit_name, UNIT_NAME_TEMPLATE)) { _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL; - _cleanup_(sd_bus_message_unrefp) sd_bus_message *unit_load_error = NULL; _cleanup_free_ char *unit = NULL; - char *unit_load_error_name, *unit_load_error_message; unit = unit_dbus_path_from_name(unit_name); if (!unit) return log_oom(); - if (need_daemon_reload(bus, unit_name) > 0) - warn_unit_file_changed(unit_name); - - r = sd_bus_get_property( - bus, - "org.freedesktop.systemd1", - unit, - "org.freedesktop.systemd1.Unit", - "LoadError", - &error, - &unit_load_error, - "(ss)"); - if (r < 0) - return log_error_errno(r, "Failed to get LoadError: %s", bus_error_message(&error, r)); - - r = sd_bus_message_read( - unit_load_error, - "(ss)", - &unit_load_error_name, - &unit_load_error_message); - if (r < 0) - return bus_log_parse_error(r); - - if (!isempty(unit_load_error_name)) { - log_error("Unit %s is not loaded: %s", unit_name, unit_load_error_message); - return 0; - } - r = sd_bus_get_property_string( bus, "org.freedesktop.systemd1", |