home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1999 March B
/
SCO_CASTOR4RRT.iso
/
nwsrvr
/
root.24
/
etc
/
init.d
/
nws
/
nws~
Wrap
Text File
|
1998-08-19
|
1KB
|
61 lines
# @(#)nws 1.2
# $Novell-NWU: $Header: /proj6/ncps/nwu_top/nws/pkg/unixware/nwsrvr/nws,v 1.2 1996/04/06 00:05:58 vtag Exp $
# NetWare Server Startup
if [ -z "$LC_ALL" -a -z "$LC_MESSAGES" ]
then
if [ -z "$LANG" ]
then
LNG=`defadm locale LANG 2>/dev/null`
if [ "$?" != 0 ]
then LANG=C
else eval $LNG
fi
fi
export LANG
fi
eval `LC_MESSAGES="$LANG" /usr/sbin/nwcm -v ipx_start_at_boot -v nws_start_at_boot`
NWSBOOT=$nws_start_at_boot
IPXBOOT=$ipx_start_at_boot
NWBIN="/usr/sbin"
if [ ! -d "$NWBIN" ]
then
# have to have binary directory mounted
exit 1
fi
case $1 in
'start')
if [ "$IPXBOOT" != "on" ]
then
# Can't start nws if IPX is not started
exit 0
fi
if [ "$NWSBOOT" != "on" ]
then
# Don't start server
exit 0
fi
LC_MESSAGES="$LANG" /sbin/tfadmin $NWBIN/nwserver
;;
'stop')
# It's just as quick to unconditionally bring down the
# server. If it isn't running, it will print a message
# indicating it can't attach to shared memory. We send
# this to /dev/null.
LC_MESSAGES="$LANG" /sbin/tfadmin $NWBIN/nwshut -g0 -c -m1200 > /dev/null 2>&1
;;
*)
echo "Usage: /etc/init.d/nws {start | stop}"
exit 1
;;
esac