Sha256: 50bcfbd5d4e7338b6ccdfde6c0f42a7cfea290a62d03791db6e0b5d0c75a016e

Contents?: true

Size: 1.81 KB

Versions: 5

Compression:

Stored size: 1.81 KB

Contents

# Deal with vmware install here as it cannot be done under puppet
# The vmware configuration uses VMWare kernel modules for network, so unload the network while puppet is running is not a good idea usually.
if dmidecode | grep -qi VMware
then
  echo "Installing vmware support services"
  # This arranges for vmware-config-tools.pl to be run on first bootup,
  # after any new kernel but before the network has been initialised
  yum -t -y -e 0 <%= @yumrepo -%> install VMwareTools <%= @osver == "5" ? "kernel-devel gcc" : "" %>
  cat <<-\EOF >/etc/init.d/vmware-config-tools
  #!/bin/sh
  # Author:       Paul Kelly
  #
  # chkconfig: 2345 01 99
  # description:  Checks and configures vmware tools

  # Source function library.
  . /etc/init.d/functions

  # If the module exists then it must have been compiled aginst this kernel and should therefore load
  start() {
        if [ ! -e /lib/modules/`uname -r`/misc/vmhgfs.<%= @osver == "3" ? "o" : "ko" %> ]
      then
          action $"Configuring vmware tools: " /usr/bin/vmware-config-tools.pl -d
      fi
      touch /var/lock/subsys/vmware-config-tools
  }

  stop() {
      rm -f /var/lock/subsys/vmware-config-tools
  }
  # See how we were called.
  case "$1" in
  start)
      start
      ;;
  stop)
      stop
      ;;
  status)
      if [ -e /var/lock/subsys/vmware-config-tools ]; then
          echo $"VMWare configuration has been checked."
      exit 1
      else
          echo $"Vmware configuration has not been checked."
      fi
      ;;
  restart|reload)
      stop
      start
      ;;
  *)
      # do not advertise unreasonable commands that there is no reason
      # to use with this device
      echo $"Usage: $0 {start|stop|status|restart|reload}"
      exit 1
  esac

  exit 0
  EOF
  chmod 755 /etc/init.d/vmware-config-tools
  chkconfig --add vmware-config-tools
fi

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_discovery-1.0.0 test/foreman_app/app/views/unattended/snippets/_vmware.erb
foreman_discovery-1.0.0.rc4 test/foreman_app/app/views/unattended/snippets/_vmware.erb
foreman_discovery-1.0.0.rc3 test/foreman_app/app/views/unattended/snippets/_vmware.erb
foreman_discovery-1.0.0.rc2 test/foreman_app/app/views/unattended/snippets/_vmware.erb
foreman_discovery-1.0.0.rc1 test/foreman_app/app/views/unattended/snippets/_vmware.erb