5b08af
From 43026829fcd2154f3a6d94eb512e7fd956fde424 Mon Sep 17 00:00:00 2001
5b08af
From: Eduardo Otubo <otubo@redhat.com>
5b08af
Date: Mon, 11 May 2020 09:24:12 +0200
5b08af
Subject: [PATCH 1/2] Use reload-or-try-restart instead of
5b08af
 try-reload-or-restart
5b08af
5b08af
RH-Author: Eduardo Otubo <otubo@redhat.com>
5b08af
Message-id: <20200504091743.28013-1-otubo@redhat.com>
5b08af
Patchwork-id: 96249
5b08af
O-Subject: [RHEL-7.9 cloud-init PATCH] Use reload-or-try-restart instead of try-reload-or-restart
5b08af
Bugzilla: 1748015
5b08af
RH-Acked-by: Vitaly Kuznetsov <vkuznets@redhat.com>
5b08af
RH-Acked-by: Mohammed Gamal <mgamal@redhat.com>
5b08af
5b08af
The verb `try-reload-or-restart' is available only on systemd >= 229 and
5b08af
RHEL-7.9 uses systemd = 219. Also this doesn't happen on RHEL-8.* which
5b08af
uses 239.
5b08af
5b08af
x-downstream-only: yes
5b08af
Resolves: rhbz#1748015
5b08af
5b08af
Signed-off-by: Eduardo Otubo <otubo@redhat.com>
5b08af
---
5b08af
 rhel/systemd/cloud-final.service | 3 ++-
5b08af
 1 file changed, 2 insertions(+), 1 deletion(-)
5b08af
5b08af
diff --git a/rhel/systemd/cloud-final.service b/rhel/systemd/cloud-final.service
5b08af
index 8510520..621d4f8 100644
5b08af
--- a/rhel/systemd/cloud-final.service
5b08af
+++ b/rhel/systemd/cloud-final.service
5b08af
@@ -12,7 +12,8 @@ RemainAfterExit=yes
5b08af
 TimeoutSec=0
5b08af
 KillMode=process
5b08af
 ExecStartPost=/bin/echo "try restart NetworkManager.service"
5b08af
-ExecStartPost=/usr/bin/systemctl try-reload-or-restart NetworkManager.service
5b08af
+# TODO: try-reload-or-restart is available only on systemd >= 229
5b08af
+ExecStartPost=/usr/bin/systemctl reload-or-try-restart NetworkManager.service
5b08af
 
5b08af
 # Output needs to appear in instance console output
5b08af
 StandardOutput=journal+console
5b08af
-- 
5b08af
1.8.3.1
5b08af