sailesh1993 / rpms / cloud-init

Forked from rpms/cloud-init a year ago
Clone
c1c26e
From 8a8af21fc8fff984f2b4285e9993cfd50cad70c4 Mon Sep 17 00:00:00 2001
c1c26e
From: Lars Kellogg-Stedman <lars@redhat.com>
c1c26e
Date: Thu, 15 Jun 2017 12:20:39 -0400
c1c26e
Subject: azure: ensure that networkmanager hook script runs
c1c26e
c1c26e
The networkmanager hook script was failing to run due to the changes
c1c26e
we made to resolve rhbz#1440831.  This corrects the regression by
c1c26e
allowing the NM hook script to run regardless of whether or not
c1c26e
cloud-init is "enabled".
c1c26e
c1c26e
Resolves: rhbz#1460206
c1c26e
X-downstream-only: true
c1c26e
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
c1c26e
---
c1c26e
 tools/hook-dhclient        | 3 +--
c1c26e
 tools/hook-network-manager | 3 +--
c1c26e
 tools/hook-rhel.sh         | 3 +--
c1c26e
 3 files changed, 3 insertions(+), 6 deletions(-)
c1c26e
c1c26e
diff --git a/tools/hook-dhclient b/tools/hook-dhclient
c1c26e
index 02122f37..181cd51e 100755
c1c26e
--- a/tools/hook-dhclient
c1c26e
+++ b/tools/hook-dhclient
c1c26e
@@ -13,8 +13,7 @@ is_azure() {
c1c26e
 }
c1c26e
 
c1c26e
 is_enabled() {
c1c26e
-    # only execute hooks if cloud-init is enabled and on azure
c1c26e
-    [ -e /run/cloud-init/enabled ] || return 1
c1c26e
+    # only execute hooks if cloud-init is running on azure
c1c26e
     is_azure
c1c26e
 }
c1c26e
 
c1c26e
diff --git a/tools/hook-network-manager b/tools/hook-network-manager
c1c26e
index 67d9044a..1d52cad7 100755
c1c26e
--- a/tools/hook-network-manager
c1c26e
+++ b/tools/hook-network-manager
c1c26e
@@ -13,8 +13,7 @@ is_azure() {
c1c26e
 }
c1c26e
 
c1c26e
 is_enabled() {
c1c26e
-    # only execute hooks if cloud-init is enabled and on azure
c1c26e
-    [ -e /run/cloud-init/enabled ] || return 1
c1c26e
+    # only execute hooks if cloud-init running on azure
c1c26e
     is_azure
c1c26e
 }
c1c26e
 
c1c26e
diff --git a/tools/hook-rhel.sh b/tools/hook-rhel.sh
c1c26e
index 513a5515..d75767e2 100755
c1c26e
--- a/tools/hook-rhel.sh
c1c26e
+++ b/tools/hook-rhel.sh
c1c26e
@@ -13,8 +13,7 @@ is_azure() {
c1c26e
 }
c1c26e
 
c1c26e
 is_enabled() {
c1c26e
-    # only execute hooks if cloud-init is enabled and on azure
c1c26e
-    [ -e /run/cloud-init/enabled ] || return 1
c1c26e
+    # only execute hooks if cloud-init is running on azure
c1c26e
     is_azure
c1c26e
 }
c1c26e
 
c1c26e
-- 
c1c26e
2.20.1
c1c26e