home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1999 March B
/
SCO_CASTOR4RRT.iso
/
cmds
/
root.3
/
usr
/
sbin
/
offline
/
offline~
Wrap
Text File
|
1998-08-19
|
1KB
|
55 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.
#ident "@(#)mp.cmds:common/cmd/online/offline.sh 1.1"
# NAME: offline
#
# DESCRIPTION: take specified processors offline
#
# SYNOPSIS: offline [-v] [processor_id ...]
#
# NOTE: This command for compatibility only
# please use psradm(1m)
if [ ${#} -eq 0 ]
then
psradm -f -a
exit
fi
VERBOSE=0
STATE=0
if [ $1 = "-v" ] # Check for the verbose flag
then
shift 1
if [ ${#} -eq 0 ] # just "offline -v"
then
psradm -f -a
psrinfo
exit
fi
VERBOSE=1;
fi
for ENG in $* # Try to turn off each engine in the list
do
if [ $VERBOSE -eq 1 ]
then
STATE=`psrinfo -s $ENG`
psrinfo $ENG
fi
psradm -f $ENG # The actual offline
if [ $STATE -eq 1 ] # Print engine state only if was not already offline
then
psrinfo $ENG
fi
done