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:
Eelco Dolstra 2013-03-28 15:02:11 +01:00
parent c2977f134e
commit 9000fd81d5

View File

@ -312,7 +312,7 @@ if (scalar @restart > 0) {
# 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
# 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";
system("@systemd@/bin/systemctl", "start", "--", @start) == 0 or $res = 4;
unlink($startListFile);