#! /bin/sh
### BEGIN INIT INFO
# Provides: vmafdd
# Required-Start: $network $remote_fs lsassd
# Required-Stop: $network $remote_fs lsassd
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# chkconfig: - 40 90
# Description: Start and Stop vmafd
### END INIT INFO

# This works for VCVA but is not a generic solution.
# MSFT solves AD snapshot/clone issue by integrating AD restore into hyper-v.  VmDir needs to explore
# other options to address VM snapshot restore in other use cases.
#

SERVICE_NAME="vmafd"

PLATFORM=""
if [ "`uname -s`" = "VMkernel" ]; then
    PLATFORM="ESXI"
fi

if [ "$PLATFORM" = "ESXI" ]; then
    PREFIX="/usr/lib/vmware/likewise"
    . /usr/lib/vmware/vmafd/bin/init-vmafd.sh
else
     PREFIX="/opt/likewise"
     . /opt/likewise/bin/init-lwsm.sh
fi
