sailesh1993 / rpms / cloud-init

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