diff --git a/src/systemctl/systemctl-is-enabled.c b/src/systemctl/systemctl-is-enabled.c index e42faf2724..8161fb0192 100644 --- a/src/systemctl/systemctl-is-enabled.c +++ b/src/systemctl/systemctl-is-enabled.c @@ -27,7 +27,7 @@ static int show_installation_targets_client_side(const char *name) { flags = UNIT_FILE_DRY_RUN | (arg_runtime ? UNIT_FILE_RUNTIME : 0); - r = unit_file_disable(arg_runtime_scope, flags, NULL, p, &changes, &n_changes); + r = unit_file_disable(arg_runtime_scope, flags, arg_root, p, &changes, &n_changes); if (r < 0) return log_error_errno(r, "Failed to get file links for %s: %m", name); diff --git a/test/test-systemctl-enable.sh b/test/test-systemctl-enable.sh index d099b6f41e..52984b4ffe 100644 --- a/test/test-systemctl-enable.sh +++ b/test/test-systemctl-enable.sh @@ -754,3 +754,15 @@ ID='the-id2' EOF SYSTEMD_OS_RELEASE="/etc/os-release2" check_alias o 'the-id2' + +: '-------is-enabled --full is relative to --root=-----------------' +mkdir -p "$root/usr/lib/systemd/system" +cat >"$root/usr/lib/systemd/system/rooted.service" </dev/null