chiark / gitweb /
fedora: invoke plymouth with its /bin instead of the /usr/bin/ path
[elogind.git] / src / fsck.c
index fe56be74ce8f8633aff03202eea7b95e949dc0f6..bfa35f2e56958a5f28c89e5b7be6c09142574227 100644 (file)
@@ -31,6 +31,7 @@
 #include "util.h"
 #include "dbus-common.h"
 #include "special.h"
+#include "bus-errors.h"
 
 static bool arg_skip = false;
 static bool arg_force = false;
@@ -38,7 +39,7 @@ static bool arg_force = false;
 static void start_target(const char *target, bool isolate) {
         DBusMessage *m = NULL, *reply = NULL;
         DBusError error;
-        const char *mode, *base_target = "base.target";
+        const char *mode, *basic_target = "basic.target";
         DBusConnection *bus = NULL;
 
         assert(target);
@@ -65,7 +66,7 @@ static void start_target(const char *target, bool isolate) {
         /* Start these units only if we can replace base.target with it */
 
         if (!dbus_message_append_args(m,
-                                      DBUS_TYPE_STRING, &base_target,
+                                      DBUS_TYPE_STRING, &basic_target,
                                       DBUS_TYPE_STRING, &target,
                                       DBUS_TYPE_STRING, &mode,
                                       DBUS_TYPE_INVALID)) {
@@ -74,7 +75,12 @@ static void start_target(const char *target, bool isolate) {
         }
 
         if (!(reply = dbus_connection_send_with_reply_and_block(bus, m, -1, &error))) {
-                log_error("Failed to start unit: %s", bus_error_message(&error));
+
+                /* Don't print a waring if we aren't called during
+                 * startup */
+                if (!dbus_error_has_name(&error, BUS_ERROR_NO_SUCH_JOB))
+                        log_error("Failed to start unit: %s", bus_error_message(&error));
+
                 goto finish;
         }