summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2013-04-25 10:35:14 +0200
committerHarald Hoyer <harald@redhat.com>2013-04-26 13:33:28 +0200
commit17f5e4577b774f8df87c7fc6068b6b32bf5d44f0 (patch)
treefc02242278bbd4bd21c7587f2329eeb1beb03f50
parent910003d022ed299b50ab36228732bb74a23d46ba (diff)
dbus-manager.c: log error, why switch-root is refused
-rw-r--r--src/core/dbus-manager.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c
index 1f5a7d94fd..56b02a1cf5 100644
--- a/src/core/dbus-manager.c
+++ b/src/core/dbus-manager.c
@@ -1503,8 +1503,11 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection,
}
/* Safety check */
- if (isempty(switch_root_init))
+ if (isempty(switch_root_init)) {
good = path_is_os_tree(switch_root);
+ if (!good)
+ log_error("Not switching root: %s does not seem to be an OS tree. /etc/os-release is missing.", switch_root);
+ }
else {
_cleanup_free_ char *p = NULL;
@@ -1513,6 +1516,8 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection,
goto oom;
good = access(p, X_OK) >= 0;
+ if (!good)
+ log_error("Not switching root: cannot execute new init %s", p);
}
if (!good)
return bus_send_error_reply(connection, message, NULL, -EINVAL);