chiark / gitweb /
mount: add automatic start ordering dependencies for mounts
[elogind.git] / src / install.c
index a05002d073e805ab1b11e3f693d07963fd47903c..38c0513fad08c19f83d5fd40116427f4a8f02a71 100644 (file)
@@ -148,6 +148,8 @@ static int parse_argv(int argc, char *argv[]) {
                                 arg_realize = REALIZE_MAYBE;
                         else if (streq(optarg, "yes"))
                                 arg_realize = REALIZE_YES;
+                        else if (streq(optarg, "reload"))
+                                arg_realize = REALIZE_RELOAD;
                         else {
                                 log_error("Invalid --realize argument %s", optarg);
                                 return -EINVAL;
@@ -771,7 +773,7 @@ static char *get_config_path(void) {
         }
 }
 
-static int do_run(void) {
+static int do_realize(void) {
         DBusConnection *bus = NULL;
         DBusError error;
         int r, q;
@@ -825,8 +827,10 @@ static int do_run(void) {
                         r = q;
 
 finish:
-        if (bus)
+        if (bus) {
+                dbus_connection_close(bus);
                 dbus_connection_unref(bus);
+        }
 
         dbus_error_free(&error);
 
@@ -887,7 +891,7 @@ int main(int argc, char *argv[]) {
                 }
         }
 
-        if (do_run() < 0)
+        if (do_realize() < 0)
                 goto finish;
 
         retval = arg_action == ACTION_TEST ? 1 : 0;