home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1999 March B
/
SCO_CASTOR4RRT.iso
/
nwnet
/
root
/
usr
/
sbin
/
track
/
track~
Wrap
Text File
|
1998-08-19
|
2KB
|
71 lines
#!/sbin/sh
# Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved.
#
# THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE
# SANTA CRUZ OPERATION INC.
#
# The copyright notice above does not evidence any actual or intended
# publication of such source code.
# $Novell-NWU: $Header: /proj6/ncps/nwu_top/nwnet/nps/sapd/track.sh,v 1.2 1996/04/05 22:05:41 vtag Exp $
# Copyright (c) 1990, 1991, 1992, 1993 Novell, Inc. All Rights Reserved.
# Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 Novell, Inc. All Rights Reserved.
# All Rights Reserved
# THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF Novell Inc.
# The copyright notice above does not evidence any
# actual or intended publication of such source code.
#
#
# Copyright 1991, 1992 Novell, Inc.
# All Rights Reserved.
#
# This work is subject to U.S. and International copyright laws and
# treaties. No part of this work may be used, practiced, performed,
# copied, distributed, revised, modified, translated, abridged,
# condensed, expanded, collected, compiled, linked, recast,
# transformed or adapted without the prior written consent
# of Novell. Any use or exploitation of this work without
# authorization could subject the perpetrator to criminal and
# civil liability.
#
#
# Make sure we are root
#
ID="`id | cut -d'=' -f2 | cut -d'(' -f1`"
if [ "$ID" -ne 0 ]
then
echo "You must be a root user to run track"
exit 1
fi
program=`basename $0`
configdir=`nwcm -C | sed -e 's/^.*=//' -e 's/"//g'`
sapdpid=`cat ${configdir}/sapd.pid 2>/dev/null`
if [ "${sapdpid}" -eq 0 ]
then
echo "${program}: sapd is not running"
exit 1
fi
case "$1" in
on|ON)
kill -USR1 ${sapdpid}
;;
off|OFF)
kill -USR2 ${sapdpid}
;;
tables|TABLES)
kill -PIPE ${sapdpid}
;;
*)
echo "Usage: ${program} {on|off|tables}\n"
exit 1
;;
esac
exit 0