#!/usr/bin/env bash
#
# Copyright (c) 2007-2010 VMware, Inc.  All rights reserved.
#
# This script manages the services needed to run VMware software

# VMWARE_INIT_INFO_PLACEHOLDER
# 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: $local_fs
# Required-Stop: $local_fs
# X-Start-Before: $network
# X-Stop-After: $network
# Default-Start: 2 3 5
# Default-Stop: 0 6
# Short-Description: VMware Tools service
# 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 "$@"
