return;
}
- r = unit_watch_timer(UNIT(s), s->watchdog_usec - offset, &s->watchdog_watch);
+ r = unit_watch_timer(UNIT(s), CLOCK_MONOTONIC, true, s->watchdog_usec - offset, &s->watchdog_watch);
if (r < 0)
log_warning("%s failed to install watchdog timer: %s", UNIT(s)->id, strerror(-r));
}
if (!(r = new(char, strlen(name) + sizeof(".service"))))
return NULL;
-#if defined(TARGET_DEBIAN) || defined(TARGET_UBUNTU) || defined(TARGET_ANGSTROM)
+#if defined(TARGET_DEBIAN) || defined(TARGET_ANGSTROM)
if (endswith(name, ".sh"))
/* Drop Debian-style .sh suffix */
strcpy(stpcpy(r, name) - 3, ".service");
"x-display-manager", SPECIAL_DISPLAY_MANAGER_SERVICE,
"null", NULL,
-#if defined(TARGET_DEBIAN) || defined(TARGET_UBUNTU) || defined(TARGET_ANGSTROM)
+#if defined(TARGET_DEBIAN) || defined(TARGET_ANGSTROM)
"mail-transport-agent", SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
#endif
/* For SysV services we strip the rc.* and *.sh
* prefixes/suffixes. */
-#if defined(TARGET_DEBIAN) || defined(TARGET_UBUNTU) || defined(TARGET_ANGSTROM)
+#if defined(TARGET_DEBIAN) || defined(TARGET_ANGSTROM)
if (endswith(name, ".sh.service"))
return -ENOENT;
#endif
r = service_load_sysv_path(s, path);
-#if defined(TARGET_DEBIAN) || defined(TARGET_UBUNTU) || defined(TARGET_ANGSTROM)
+#if defined(TARGET_DEBIAN) || defined(TARGET_ANGSTROM)
if (r >= 0 && UNIT(s)->load_state == UNIT_STUB) {
/* Try Debian style *.sh source'able init scripts */
strcat(path, ".sh");
k = s->deserialized_state == SERVICE_AUTO_RESTART ? s->restart_usec : s->timeout_start_usec;
- if ((r = unit_watch_timer(UNIT(s), k, &s->timer_watch)) < 0)
+ r = unit_watch_timer(UNIT(s), CLOCK_MONOTONIC, true, k, &s->timer_watch);
+ if (r < 0)
return r;
}
}
}
if (timeout && s->timeout_start_usec) {
- r = unit_watch_timer(UNIT(s), s->timeout_start_usec, &s->timer_watch);
+ r = unit_watch_timer(UNIT(s), CLOCK_MONOTONIC, true, s->timeout_start_usec, &s->timer_watch);
if (r < 0)
goto fail;
} else
!set_contains(s->restart_ignore_status.signal, INT_TO_PTR(s->main_exec_status.status)))
) {
- r = unit_watch_timer(UNIT(s), s->restart_usec, &s->timer_watch);
+ r = unit_watch_timer(UNIT(s), CLOCK_MONOTONIC, true, s->restart_usec, &s->timer_watch);
if (r < 0)
goto fail;
if (wait_for_exit) {
if (s->timeout_stop_usec > 0) {
- r = unit_watch_timer(UNIT(s), s->timeout_stop_usec, &s->timer_watch);
+ r = unit_watch_timer(UNIT(s), CLOCK_MONOTONIC, true, s->timeout_stop_usec, &s->timer_watch);
if (r < 0)
goto fail;
}
/* Don't restart things if we are going down anyway */
log_info("Stop job pending for unit, delaying automatic restart.");
- r = unit_watch_timer(UNIT(s), s->restart_usec, &s->timer_watch);
+ r = unit_watch_timer(UNIT(s), CLOCK_MONOTONIC, true, s->restart_usec, &s->timer_watch);
if (r < 0)
goto fail;