Set $REG_MACHINE_NAME

Default $REG_MACHINE_NAME for satellite or portal registration to
$UNDERCLOUD_VM_NAME so we get a more meaningful registered name.

Change-Id: I6946a3661a87faad11aebfabe1872017cfc9ba0e
This commit is contained in:
James Slagle 2015-04-28 14:38:17 -04:00
parent fdddbbaa94
commit 11824d3a37

View File

@ -58,6 +58,11 @@ if [ "$TRIPLEO_OS_FAMILY" = "redhat" ]; then
fi fi
export UNDERCLOUD_VM_NAME=${UNDERCLOUD_VM_NAME:-"instack"} export UNDERCLOUD_VM_NAME=${UNDERCLOUD_VM_NAME:-"instack"}
# Set REG_MACHINE_NAME to match UNDERCLOUD_VM_NAME if it isn't already defined.
# This will be the name used to register the system to satllite/portal. If
# registration is not in use, this doesn't hurt anything.
export REG_MACHINE_NAME=${REG_MACHINE_NAME:-"$UNDERCLOUD_VM_NAME"}
if sudo virsh list --all --name | grep -q "^$UNDERCLOUD_VM_NAME$"; then if sudo virsh list --all --name | grep -q "^$UNDERCLOUD_VM_NAME$"; then
set +x set +x
echo "*** Error ***" echo "*** Error ***"