ef3f20
From d8618679265a57f4d872bd9972e3abb807db4e15 Mon Sep 17 00:00:00 2001
ef3f20
From: Lars Kellogg-Stedman <lars@redhat.com>
ef3f20
Date: Thu, 15 Jun 2017 12:20:39 -0400
ef3f20
Subject: [PATCH] azure: ensure that networkmanager hook script runs
ef3f20
ef3f20
The networkmanager hook script was failing to run due to the changes
ef3f20
we made to resolve rhbz#1440831.  This corrects the regression by
ef3f20
allowing the NM hook script to run regardless of whether or not
ef3f20
cloud-init is "enabled".
ef3f20
ef3f20
Resolves: rhbz#1460206
ef3f20
X-downstream-only: true
ef3f20
---
ef3f20
 tools/hook-dhclient        | 3 +--
ef3f20
 tools/hook-network-manager | 3 +--
ef3f20
 tools/hook-rhel.sh         | 3 +--
ef3f20
 3 files changed, 3 insertions(+), 6 deletions(-)
ef3f20
ef3f20
diff --git a/tools/hook-dhclient b/tools/hook-dhclient
ef3f20
index 02122f3..181cd51 100755
ef3f20
--- a/tools/hook-dhclient
ef3f20
+++ b/tools/hook-dhclient
ef3f20
@@ -13,8 +13,7 @@ is_azure() {
ef3f20
 }
ef3f20
 
ef3f20
 is_enabled() {
ef3f20
-    # only execute hooks if cloud-init is enabled and on azure
ef3f20
-    [ -e /run/cloud-init/enabled ] || return 1
ef3f20
+    # only execute hooks if cloud-init is running on azure
ef3f20
     is_azure
ef3f20
 }
ef3f20
 
ef3f20
diff --git a/tools/hook-network-manager b/tools/hook-network-manager
ef3f20
index 67d9044..1d52cad 100755
ef3f20
--- a/tools/hook-network-manager
ef3f20
+++ b/tools/hook-network-manager
ef3f20
@@ -13,8 +13,7 @@ is_azure() {
ef3f20
 }
ef3f20
 
ef3f20
 is_enabled() {
ef3f20
-    # only execute hooks if cloud-init is enabled and on azure
ef3f20
-    [ -e /run/cloud-init/enabled ] || return 1
ef3f20
+    # only execute hooks if cloud-init running on azure
ef3f20
     is_azure
ef3f20
 }
ef3f20
 
ef3f20
diff --git a/tools/hook-rhel.sh b/tools/hook-rhel.sh
ef3f20
index 513a551..d75767e 100755
ef3f20
--- a/tools/hook-rhel.sh
ef3f20
+++ b/tools/hook-rhel.sh
ef3f20
@@ -13,8 +13,7 @@ is_azure() {
ef3f20
 }
ef3f20
 
ef3f20
 is_enabled() {
ef3f20
-    # only execute hooks if cloud-init is enabled and on azure
ef3f20
-    [ -e /run/cloud-init/enabled ] || return 1
ef3f20
+    # only execute hooks if cloud-init is running on azure
ef3f20
     is_azure
ef3f20
 }
ef3f20