#!/bin/bash

JAVA_EXEC=$(which java)
CLIENT_DIR=/usr/lib/mdstoragemanager/client
FFEAT=FULL_SA
STARTUP_MODE=2

number=0
numargs=$#
while [ "$number" -lt "$numargs" ]
do
        if [ "`echo $1 | grep \'`" != "" ]
        then
                args="$(echo -n $args) \"$1\""
        else
                args="$(echo -n $args) $1"
        fi
	number=`expr $number + 1`
        shift
done

$JAVA_EXEC -mx128M -Ddevmgr.datadir=/var/opt/SM -Ddevmgr.dmv.featureOption=$FFEAT -DMANAGEMENT_APP_STARTUP_MODE=$STARTUP_MODE -DstorageManager=6 -classpath $CLIENT_DIR:$CLIENT_DIR/jhall.jar:$CLIENT_DIR/SMclient.jar devmgr.cli.CommandLineInterface $args 

