2014-09-22 14:12:09 +00:00
|
|
|
#!/bin/bash
|
2014-09-04 04:56:29 +00:00
|
|
|
|
|
|
|
if [ "${DIB_DEBUG_TRACE:-1}" -gt 0 ]; then
|
|
|
|
set -x
|
|
|
|
fi
|
|
|
|
set -eu
|
2014-09-22 14:12:09 +00:00
|
|
|
set -o pipefail
|
|
|
|
|
|
|
|
# When building an image with diskimage-builder, you will need to register
|
|
|
|
# with either the customer portal or a satellite instance in order to enable
|
|
|
|
# repos for software installation. In most cases, it is desirable to
|
|
|
|
# unregister a system when diskimage-builder is completing so the customer
|
|
|
|
# entitlements are not decremented. This option is here for the case when
|
|
|
|
# a single image needs to be built and deployed as a single instance or for
|
|
|
|
# debugging purposes so you can check the portal or satellite to see what was
|
|
|
|
# registered. Set REG_HALT_UNREGISTER to any non-null value to enable this
|
|
|
|
# functionality.
|
|
|
|
if [ -z "${REG_HALT_UNREGISTER:-}" ]; then
|
|
|
|
subscription-manager unregister
|
|
|
|
fi
|