#
# SCCS_ID - "@(#)S86wintcp (TWG)        1.1      15:12:04 - 89/07/31"
#
# @(#) Copyright 1989.  The Wollongong Group, Inc.  All Rights Reserved.
#

#
# Start RFS if WIN/TCP already running. 
#
ETC=/usr/etc

#
# Check if inetinit is running.
#
pids=`/bin/ps -e | /usr/bin/egrep "inetinit" | /usr/bin/cut -c1-6`
if [ "${pids}" != "" ]
then
#
# Start up RFS
#
  if [ -s /usr/options/remote.name ]	# RFS installed ?
  then
    if [ -s /usr/net/nls/tcp ]		# Initialized ?
    then
      pids=`grep 105 /usr/net/nls/tcp/dbf`
      if [ "${pids}" != "" ]
      then
	pids=`/bin/ps -e | /usr/bin/egrep "listen" | /usr/bin/cut -c1-6`
	if [ "${pids}" = "" ]
	then
          /usr/bin/nlsadmin -q tcp || /usr/bin/nlsadmin -s tcp
	fi
      fi 
    fi
  fi
fi
