#
# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#

. `dirname $0`/samba_config

if [ ! -z "${FMDOMAIN}" ]; then
   FMUSER=${FMDOMAIN}'\\\\'${FMUSER}%${FMPASS}
else
   FMUSER=${FMUSER}%${FMPASS}
fi

if [ ! -z "$SMB_LIB_PATH" ]; then
   SMB_LIB_PATH="-P "$SMB_LIB_PATH
fi


scrgadm -a -j $RS -g $RG -t SUNW.gds \
-x Start_command="/opt/SUNWscsmb/samba/bin/start_samba \
-R $RS -G $RG -B $SMB_BIN -S $SMB_SBIN -C $SMB_INST \
-L $SMB_LOG -U ${FMUSER} -M scmondir $SMB_LIB_PATH -N $RUN_NMBD" \
-x Stop_command="/opt/SUNWscsmb/samba/bin/stop_samba \
-R $RS -G $RG -B $SMB_BIN -S $SMB_SBIN -C $SMB_INST \
-L $SMB_LOG -U ${FMUSER} -M scmondir $SMB_LIB_PATH -N $RUN_NMBD" \
-x Probe_command="/opt/SUNWscsmb/samba/bin/probe_samba \
-R $RS -G $RG -B $SMB_BIN -S $SMB_SBIN -C $SMB_INST \
-L $SMB_LOG -U ${FMUSER} -M scmondir $SMB_LIB_PATH -N $RUN_NMBD" \
-y Port_list=139/tcp -y Network_resources_used=$LH \
-x Stop_signal=9 \
-y Resource_dependencies=$HAS_RS
