chiark / gitweb /
login: make sure to replace existing units
authorDavid Herrmann <dh.herrmann@gmail.com>
Mon, 16 Nov 2015 14:43:18 +0000 (15:43 +0100)
committerSven Eden <yamakuzure@gmx.net>
Wed, 26 Apr 2017 10:58:55 +0000 (12:58 +0200)
When queuing unit jobs, we should rather replace existing units than
fail. This is especially important when we queued a user-shutdown and a
new login is encountered. In this case, we better raplce the shutdown
jobs. elogind takes care of everything else.

src/login/logind-dbus.c

index 29f26f2db383410f35a64500b649fcefc7b12f07..b9296b5e5cc60185cd50a05d237f564eaf6c61ae 100644 (file)
@@ -2863,7 +2863,7 @@ int manager_start_unit(Manager *manager, const char *unit, sd_bus_error *error,
                         "StartUnit",
                         error,
                         &reply,
-                        "ss", unit, "fail");
+                        "ss", unit, "replace");
         if (r < 0)
                 return r;