chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
s/seperate/separate/
[elogind.git]
/
src
/
timer.c
diff --git
a/src/timer.c
b/src/timer.c
index 627a360fe6f339f5a2e413b72e1e4101742eed55..1477aa5256d622412180fb9ffdb02e0f17a2329d 100644
(file)
--- a/
src/timer.c
+++ b/
src/timer.c
@@
-78,11
+78,15
@@
static int timer_add_default_dependencies(Timer *t) {
assert(t);
assert(t);
- if (t->meta.manager->running_as == MANAGER_SYSTEM)
+ if (t->meta.manager->running_as == MANAGER_SYSTEM) {
+ if ((r = unit_add_dependency_by_name(UNIT(t), UNIT_BEFORE, SPECIAL_BASIC_TARGET, NULL, true)) < 0)
+ return r;
+
if ((r = unit_add_two_dependencies_by_name(UNIT(t), UNIT_AFTER, UNIT_REQUIRES, SPECIAL_SYSINIT_TARGET, NULL, true)) < 0)
return r;
if ((r = unit_add_two_dependencies_by_name(UNIT(t), UNIT_AFTER, UNIT_REQUIRES, SPECIAL_SYSINIT_TARGET, NULL, true)) < 0)
return r;
+ }
- return unit_add_two_dependencies_by_name(UNIT(t), UNIT_BEFORE, UNIT_CONFLICT
ED_BY
, SPECIAL_SHUTDOWN_TARGET, NULL, true);
+ return unit_add_two_dependencies_by_name(UNIT(t), UNIT_BEFORE, UNIT_CONFLICT
S
, SPECIAL_SHUTDOWN_TARGET, NULL, true);
}
static int timer_load(Unit *u) {
}
static int timer_load(Unit *u) {
@@
-148,7
+152,7
@@
static void timer_set_state(Timer *t, TimerState state) {
timer_state_to_string(old_state),
timer_state_to_string(state));
timer_state_to_string(old_state),
timer_state_to_string(state));
- unit_notify(UNIT(t), state_translation_table[old_state], state_translation_table[state]);
+ unit_notify(UNIT(t), state_translation_table[old_state], state_translation_table[state]
, true
);
}
static void timer_enter_waiting(Timer *t, bool initial);
}
static void timer_enter_waiting(Timer *t, bool initial);