From 41236dcf61b8728335b6a9a79936922706e64dbc Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Sat, 5 Oct 2019 17:54:11 +0200 Subject: [PATCH] LRM shutdown: factor out shutdown type to reuse message Signed-off-by: Thomas Lamprecht --- src/PVE/HA/LRM.pm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/PVE/HA/LRM.pm b/src/PVE/HA/LRM.pm index ea58ab8..5b986a4 100644 --- a/src/PVE/HA/LRM.pm +++ b/src/PVE/HA/LRM.pm @@ -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"); -- 2.39.2