]> git.proxmox.com Git - pve-ha-manager.git/commitdiff
LRM shutdown: factor out shutdown type to reuse message
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 5 Oct 2019 15:54:11 +0000 (17:54 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 5 Oct 2019 15:55:09 +0000 (17:55 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/HA/LRM.pm

index ea58ab8b5ee6a8ec048aa363497994521410acc1..5b986a454cc064b56d380e82bb97cc9015a0a509 100644 (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");