Hack: force timers.target to be started
Usually timers.target is pulled in by basic.target, but we don't restart basic.target. So timers.target wouldn't be started when coming from an older systemd.
This commit is contained in:
parent
c2977f134e
commit
9000fd81d5
@ -312,7 +312,7 @@ if (scalar @restart > 0) {
|
|||||||
# that are symlinks to other units. We shouldn't start both at the
|
# that are symlinks to other units. We shouldn't start both at the
|
||||||
# same time because we'll get a "Failed to add path to set" error from
|
# same time because we'll get a "Failed to add path to set" error from
|
||||||
# systemd.
|
# systemd.
|
||||||
my @start = unique("default.target", split('\n', read_file($startListFile, err_mode => 'quiet') // ""));
|
my @start = unique("default.target", "timers.target", split('\n', read_file($startListFile, err_mode => 'quiet') // ""));
|
||||||
print STDERR "starting the following units: ", join(", ", sort(@start)), "\n";
|
print STDERR "starting the following units: ", join(", ", sort(@start)), "\n";
|
||||||
system("@systemd@/bin/systemctl", "start", "--", @start) == 0 or $res = 4;
|
system("@systemd@/bin/systemctl", "start", "--", @start) == 0 or $res = 4;
|
||||||
unlink($startListFile);
|
unlink($startListFile);
|
||||||
|
Loading…
Reference in New Issue
Block a user