anchor.diff:    done
     rm -f /etc/yum/vars/releasever
     yum-config-manager --enable 'nailgun' &> /dev/null
  +  subscription-manager unregister
   }
   trap revert_back_to_centos EXIT
   
  
positive.code: 
  #Disable subscription-manager plugins
  for plugin in $rhsm_plugins; do
    sed -i 's/^enabled.*/enabled=1/' "/etc/yum/pluginconf.d/${plugin}.conf" 2>/dev/null || :
  done
  
  #Run registration
  
negative.code: #!/bin/bash -xe
  
  function revert_back_to_centos() {
    # Removes redhat-release-server rpm and replaces it with centos-release
    echo "Removing Red Hat temporary configuration."
    if rpm -q redhat-release-server &>/dev/null; then
      rpm -Uvh --force /root/centos-release/centos-release*.rpm
      rm -f /etc/yum.repos.d/CentOS*
      rpm -e --nodeps --noscripts redhat-release-server
    fi
    #Disable subscription-manager and rhn plugins
  