chiark / gitweb /
path: simplify recheck logic
[elogind.git] / src / service.c
index a297cd911724540c75a1d98483139f1996559e2f..0845d21bad1d9a18f3442cda37250778d8ab775d 100644 (file)
@@ -286,7 +286,7 @@ static int sysv_translate_facility(const char *name, const char *filename, char
                 "portmap",              SPECIAL_RPCBIND_TARGET,
                 "remote_fs",            SPECIAL_REMOTE_FS_TARGET,
                 "syslog",               SPECIAL_SYSLOG_TARGET,
-                "time",                 SPECIAL_RTC_SET_TARGET,
+                "time",                 SPECIAL_TIME_SYNC_TARGET,
 
                 /* common extensions */
                 "mail-transfer-agent",  SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
@@ -1470,7 +1470,7 @@ static void service_set_state(Service *s, ServiceState state) {
 
         /* For the inactive states unit_notify() will trim the cgroup,
          * but for exit we have to do that ourselves... */
-        if (state == SERVICE_EXITED)
+        if (state == SERVICE_EXITED && s->meta.manager->n_deserializing <= 0)
                 cgroup_bonding_trim_list(s->meta.cgroup_bondings, true);
 
         if (old_state != state)