#!/usr/bin/env bash
#
# Copyright (C) 1998-2002 VMware, Inc.  All Rights Reserved.
#
# This script manages the services needed to run VMware software

# Basic support for IRIX style chkconfig
# chkconfig: 235 03 99
# description: Manages the services needed to run VMware software

# Basic support for the Linux Standard Base Specification 1.0.0 (to be used by
# insserv for example)
### BEGIN INIT INFO
# Provides: vmware-tools
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 5
# Default-Stop: 0 6
# Description: Manages the services needed to run VMware Tools
### END INIT INFO

LIBDIR=/usr/lib/vmware-tools

. $LIBDIR/install/vmware-open-vm-tools-common/services.sh source
# Override module loading functions.
. $LIBDIR/install/vmware-open-vm-tools-common/functions

# We have to use our own implementation of vmware_start_pvscsi because
# the upstream version uses modinfo and insmod directly which will
# break on RHEL and SLES.
vmware_start_pvscsi()
{
   if [ `isLoaded $pvscsi` != 'yes' ]; then
      vmware_load_module pvscsi
   fi
}

main "$@"
