anchor.diff:    sed -i "s/HOSTNAME=.*/HOSTNAME=${hostname}/" /etc/sysconfig/network
   
     if egrep -q "^127.0.1.1[[:space:]]" /etc/hosts >/dev/null ; then
  -    sed -i "s/^\(127[.]0[.]1[.]1[[:space:]]\+\)/\1${hostnames} /" \
  -      /etc/hosts
  +    sed -i "s/^\(127[.]0[.]1[.]1[[:space:]]\+\)/\1${hostnames} /" /etc/hosts
     else
  -    sed -i "s/^\(127[.]0[.]0[.]1[[:space:]]\+.*\)$/\1\n127.0.1.1 ${hostnames} /" \
  -      /etc/hosts
  +    sed -i "s/^\(127[.]0[.]0[.]1[[:space:]]\+.*\)$/\1\n127.0.1.1 ${hostnames} /" /etc/hosts
  +  fi
  +  /bin/hostname ${hostname}
  +}
  +
  +set_hostname_for_redhat() {
  +  if hostname | grep -q "$hostname" > /dev/null ; then
  +    printf -- "-----> Hostname is correct, so skipping...\n"
  +    return
  +  fi
  +
  +  local host_first="$(echo $hostname | cut -d . -f 1)"
  +  local hostnames="${hostname} ${host_first}"
  +
  +  sed -i "s/HOSTNAME=.*/HOSTNAME=${hostname}/" /etc/sysconfig/network
  +
  +  if egrep -q "^127.0.1.1[[:space:]]" /etc/hosts >/dev/null ; then
  +    sed -i "s/^\(127[.]0[.]1[.]1[[:space:]]\+\)/\1${hostnames} /" /etc/hosts
  +  else
  +    sed -i "s/^\(127[.]0[.]0[.]1[[:space:]]\+.*\)$/\1\n127.0.1.1 ${hostnames} /" /etc/hosts
  +  fi
  +  /bin/hostname ${hostname}
  +}
  +
  +set_hostname_for_amazon() {
  +  if hostname | grep -q "$hostname" > /dev/null ; then
  +    printf -- "-----> Hostname is correct, so skipping...\n"
  +    return
  +  fi
  +
  +  local host_first="$(echo $hostname | cut -d . -f 1)"
  +  local hostnames="${hostname} ${host_first}"
  +
  +  sed -i "s/HOSTNAME=.*/HOSTNAME=${hostname}/" /etc/sysconfig/network
  +
  +  if egrep -q "^127.0.1.1[[:space:]]" /etc/hosts >/dev/null ; then
  +    sed -i "s/^\(127[.]0[.]1[.]1[[:space:]]\+\)/\1${hostnames} /" /etc/hosts
  +  else
  +    sed -i "s/^\(127[.]0[.]0[.]1[[:space:]]\+.*\)$/\1\n127.0.1.1 ${hostnames} /" /etc/hosts
  +  fi
  +  /bin/hostname ${hostname}
  +}
  +
  +set_hostname_for_scientific() {
  +  if hostname | grep -q "$hostname" > /dev/null ; then
  +    printf -- "-----> Hostname is correct, so skipping...\n"
  +    return
  +  fi
  +
  +  local host_first="$(echo $hostname | cut -d . -f 1)"
  +  local hostnames="${hostname} ${host_first}"
  +
  +  sed -i "s/HOSTNAME=.*/HOSTNAME=${hostname}/" /etc/sysconfig/network
  +
  +  if egrep -q "^127.0.1.1[[:space:]]" /etc/hosts >/dev/null ; then
  +    sed -i "s/^\(127[.]0[.]1[.]1[[:space:]]\+\)/\1${hostnames} /" /etc/hosts
  +  else
  +    sed -i "s/^\(127[.]0[.]0[.]1[[:space:]]\+.*\)$/\1\n127.0.1.1 ${hostnames} /" /etc/hosts
  +  fi
  +  /bin/hostname ${hostname}
  +}
  +
  +set_hostname_for_fedora() {
  +  if hostname | grep -q "$hostname" > /dev/null ; then
  +    printf -- "-----> Hostname is correct, so skipping...\n"
  +    return
  +  fi
  +
  +  local host_first="$(echo $hostname | cut -d . -f 1)"
  +  local hostnames="${hostname} ${host_first}"
  +
  +  sed -i "s/HOSTNAME=.*/HOSTNAME=${hostname}/" /etc/sysconfig/network
  +
  +  if egrep -q "^127.0.1.1[[:space:]]" /etc/hosts >/dev/null ; then
  +    sed -i "s/^\(127[.]0[.]1[.]1[[:space:]]\+\)/\1${hostnames} /" /etc/hosts
  +  else
  +    sed -i "s/^\(127[.]0[.]0[.]1[[:space:]]\+.*\)$/\1\n127.0.1.1 ${hostnames} /" /etc/hosts
     fi
     /bin/hostname ${hostname}
   }
  
positive.code: }
  
  set_hostname_for_centos() {
    if hostname | grep -q "$hostname" >/dev/null ; then
      printf "Hostname is correct, so skipping...\n"
      return
    fi
  
  
negative.code: 
  setup() {
    yum update -y
    
    if [[ grep -qi "Red Hat" /etc/redhat-release ]]; then
      platform="redhat"
    else
      platform=$(cat /etc/redhat-release | cut -d" " -f1 | tr [[:upper:]] [[:lower:]])
    fi
    if [[ grep -qi "Rawhide" /etc/redhat-release ]]; then
      platform_version=$(grep -Po '([0-9]+) (?=\(Rawhide\))' /etc/redhat-release)
    else
      platform_version=$(grep -Po '(?<=release )[0-9\.]+' /etc/redhat-release)
    fi
  
    yum install ruby rubygems ruby-devel -y
    yum install readline-devel zlib-devel libyaml-devel openssl-devel \
  