5
0
mirror of git://git.proxmox.com/git/pve-ha-manager.git synced 2025-01-23 02:04:19 +03:00

LRM shutdown: factor out shutdown type to reuse message

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2019-10-05 17:54:11 +02:00
parent a19f2576aa
commit 41236dcf61

View File

@ -88,12 +88,9 @@ sub shutdown_request {
}
if ($shutdown) {
my $shutdown_type = $reboot ? 'reboot' : 'shutdown';
if ($freeze_all) {
if ($reboot) {
$haenv->log('info', "reboot LRM, stop and freeze all services");
} else {
$haenv->log('info', "shutdown LRM, stop and freeze all services");
}
$haenv->log('info', "$shutdown_type LRM, stop and freeze all services");
$self->{mode} = 'restart';
} else {
$haenv->log('info', "shutdown LRM, stop all services");