From 040524b4a3e37e4705969004611b7e934552b533 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 28 Jan 2016 19:32:07 +0100 Subject: systemctl: consider a chroot() environment always offline --- src/systemctl/systemctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/systemctl') diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index f5703af241..c7402b5731 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -5792,7 +5792,7 @@ static int is_system_running(int argc, char *argv[], void *userdata) { sd_bus *bus; int r; - if (arg_transport == BUS_TRANSPORT_LOCAL && !sd_booted()) { + if (running_in_chroot() > 0 || (arg_transport == BUS_TRANSPORT_LOCAL && !sd_booted())) { if (!arg_quiet) puts("offline"); return EXIT_FAILURE; @@ -7642,7 +7642,7 @@ int main(int argc, char*argv[]) { if (r <= 0) goto finish; - if (running_in_chroot() > 0 && arg_action != ACTION_SYSTEMCTL) { + if (arg_action != ACTION_SYSTEMCTL && running_in_chroot() > 0) { log_info("Running in chroot, ignoring request."); r = 0; goto finish; -- cgit v1.2.3-54-g00ecf