From 87379da56afa9078200015aed4d595b7fa77b2df Mon Sep 17 00:00:00 2001 From: Bernard Cafarelli Date: Wed, 22 Jun 2016 17:10:04 +0200 Subject: [PATCH] Run RHEL system unregister element earlier This does not need to be the last finalise step, and some late finalise steps can disable the network (for example, Octavia amphora DIB cleans resolv.conf at 99) Moving it to 60 also aligns it with rhsm-unregister rhel6 element, and still allows to run subscription-manager steps before. Also fix an unbound variable error that appeared when both BASE_IMAGE_FILE and DIB_CLOUD_IMAGES are unset. Change-Id: Icb0e20b01479fea345e01309fc4bf3f7f639900c --- .../rhel-common/finalise.d/{99-unregister => 60-unregister} | 0 elements/rhel7/root.d/10-rhel7-cloud-image | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename elements/rhel-common/finalise.d/{99-unregister => 60-unregister} (100%) diff --git a/elements/rhel-common/finalise.d/99-unregister b/elements/rhel-common/finalise.d/60-unregister similarity index 100% rename from elements/rhel-common/finalise.d/99-unregister rename to elements/rhel-common/finalise.d/60-unregister diff --git a/elements/rhel7/root.d/10-rhel7-cloud-image b/elements/rhel7/root.d/10-rhel7-cloud-image index 55d39274..be38caa4 100755 --- a/elements/rhel7/root.d/10-rhel7-cloud-image +++ b/elements/rhel7/root.d/10-rhel7-cloud-image @@ -26,7 +26,7 @@ if [ -n "$DIB_LOCAL_IMAGE" ]; then BASE_IMAGE_FILE=`basename $DIB_LOCAL_IMAGE` BASE_IMAGE_TAR=$BASE_IMAGE_FILE.tgz else - if [ -z "${BASE_IMAGE_FILE:-}" -o -z "${DIB_CLOUD_IMAGES}" ]; then + if [ -z "${BASE_IMAGE_FILE:-}" -o -z "${DIB_CLOUD_IMAGES:-}" ]; then echo "No source for a base image file configured." echo "See rhel7 element readme for details on how to obtain and use a base image." exit 1