mirror of
https://github.com/schoebel/mars
synced 2025-02-16 12:06:51 +00:00
marsadm: set-systemd-unit obeys prosumer
This commit is contained in:
parent
87f9972d60
commit
9a74ff6f54
@ -2200,7 +2200,12 @@ sub set_systemd_unit_phase1 {
|
||||
my $want_path = "$mars/resource-$res/systemd-want";
|
||||
if ($start_name) {
|
||||
set_link($start_name, $unit_start_path);
|
||||
my $target = _get_designated_primary($cmd, $res, 1);
|
||||
my $target;
|
||||
if (has_prosumer($cmd, $res)) {
|
||||
$target = _get_prosumer($cmd, $res);
|
||||
} else {
|
||||
$target = _get_designated_primary($cmd, $res, 1);
|
||||
}
|
||||
if ($target) {
|
||||
set_link($target, $want_path);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user