#!/bin/bash
####################################################################
#
#      File: S19klmvdcmgr
#      Name: Matthew Anger
#
#      Description:
#       Initialization of vdc_mgr klm.
#	Actual location on disk: /isan/etc/rc.d/rc.isan-start/S19klmvdcmgr
#
#
# Copyright (c) 1985-2004, 2015 by cisco Systems, Inc.
# All rights reserved.
#
#
# $Id: S19vdcklm,v 1.1 2006/10/31 21:24:45 bigao Exp $
#
#####################################################################

. /etc/init.d/mod_ins/module-load-functions

boot_debug "Executing /etc/rc.d/rcS.d/S10klmvdcmgr"

start_vdc()
{
    action "" /bin/instklmvdcmgr start

    if [ $? -ne 0 ]; then
	saved_error=$?
	boot_debug "VDC_MGR klm installation failed: error ${saved_error}"
        exit ${saved_error}
    fi

    boot_debug "VDC_MGR klm installed successfully"
}

stop_vdc()
{
    action "" /bin/instklmvdcmgr stop
    if [ $? -ne 0 ]; then
	saved_error=$?
	boot_debug "VDC_MGR klm removal failed: error ${saved_error}"
        exit ${saved_error}
    fi

    boot_debug "VDC_MGR klm removed successfully"
}

boot_debug "Executing $0 [S10vdcklm]"

case $1 in
    start)
	boot_debug "Starting VDC_MGR klm"
	start_vdc
    ;;
    stop)
	boot_debug "Stopping VDC_MGR klm"
	stop_vdc
    ;;
esac
