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
This commit is contained in:
Bernard Cafarelli 2016-06-22 17:10:04 +02:00
parent abe666f17e
commit 87379da56a
2 changed files with 1 additions and 1 deletions

View File

@ -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