Don't special-case systemd-journald.service and systemd-user-sessions.service
This commit is contained in:
parent
884f58fa8a
commit
827e3dadc8
@ -126,7 +126,7 @@ while (my ($unit, $state) = each %{$activePrev}) {
|
|||||||
# active after the system has resumed, which probably
|
# active after the system has resumed, which probably
|
||||||
# should not be the case. Just ignore it.
|
# should not be the case. Just ignore it.
|
||||||
if ($unit ne "suspend.target" && $unit ne "hibernate.target") {
|
if ($unit ne "suspend.target" && $unit ne "hibernate.target") {
|
||||||
unless (boolIsTrue($unitInfo->{'RefuseManualStart'} // "false")) {
|
unless (boolIsTrue($unitInfo->{'RefuseManualStart'} // "no")) {
|
||||||
write_file($startListFile, { append => 1 }, "$unit\n");
|
write_file($startListFile, { append => 1 }, "$unit\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -142,7 +142,7 @@ while (my ($unit, $state) = each %{$activePrev}) {
|
|||||||
# Stopping a target generally has no effect on other units
|
# Stopping a target generally has no effect on other units
|
||||||
# (unless there is a PartOf dependency), so this is just a
|
# (unless there is a PartOf dependency), so this is just a
|
||||||
# bookkeeping thing to get systemd to do the right thing.
|
# bookkeeping thing to get systemd to do the right thing.
|
||||||
if (boolIsTrue($unitInfo->{'X-StopOnReconfiguration'} // "false")) {
|
if (boolIsTrue($unitInfo->{'X-StopOnReconfiguration'} // "no")) {
|
||||||
push @unitsToStop, $unit;
|
push @unitsToStop, $unit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -157,10 +157,7 @@ while (my ($unit, $state) = each %{$activePrev}) {
|
|||||||
# FIXME: do something?
|
# FIXME: do something?
|
||||||
} else {
|
} else {
|
||||||
my $unitInfo = parseUnit($newUnitFile);
|
my $unitInfo = parseUnit($newUnitFile);
|
||||||
if (!boolIsTrue($unitInfo->{'X-RestartIfChanged'} // "true")
|
if (!boolIsTrue($unitInfo->{'X-RestartIfChanged'} // "yes")) {
|
||||||
|| $unit eq "systemd-user-sessions.service"
|
|
||||||
|| $unit eq "systemd-journald.service")
|
|
||||||
{
|
|
||||||
push @unitsToSkip, $unit;
|
push @unitsToSkip, $unit;
|
||||||
} else {
|
} else {
|
||||||
# If this unit is socket-activated, then stop the
|
# If this unit is socket-activated, then stop the
|
||||||
@ -181,7 +178,7 @@ while (my ($unit, $state) = each %{$activePrev}) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!boolIsTrue($unitInfo->{'X-StopIfChanged'} // "true")) {
|
if (!boolIsTrue($unitInfo->{'X-StopIfChanged'} // "yes")) {
|
||||||
|
|
||||||
# This unit should be restarted instead of
|
# This unit should be restarted instead of
|
||||||
# stopped and started.
|
# stopped and started.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user