mirror of
https://github.com/systemd/systemd.git
synced 2025-02-03 17:47:28 +03:00
Allow timers to trigger timers (#8043)
Unlike any other unit type, it makes sense for a timer to start another timer. It is an easy way to crate logical "and" between time conditions for instance, every day but no less than 5' after boot can easily be implemented by a OnBootSec triggering an OnCalendar. This is particulary usefull with Persistant timers which tend to all fire together at startup
This commit is contained in:
parent
c83812b1c4
commit
49219a1c03
@ -1745,9 +1745,8 @@ int config_parse_trigger_unit(
|
||||
log_syntax(unit, LOG_ERR, filename, line, 0, "Unit type not valid, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (type == u->type) {
|
||||
log_syntax(unit, LOG_ERR, filename, line, 0, "Trigger cannot be of same type, ignoring: %s", rvalue);
|
||||
if (unit_has_name(u, p)) {
|
||||
log_syntax(unit, LOG_ERR, filename, line, 0, "Units cannot trigger themselves, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user