home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1999 March B
/
SCO_CASTOR4RRT.iso
/
nwnet
/
root
/
usr
/
lib
/
netcfg
/
remove
/
ipx
/
ipx~
Wrap
Text File
|
1998-08-19
|
2KB
|
72 lines
#!/bin/sh
#
# Copyright (C) 1997, The Santa Cruz Operation, Inc.
# All Rights Reserved.
#
# The information in this file is provided for the exclusive use of
# the licensees of The Santa Cruz Operation, Inc. Such users have the
# right to use, modify, and incorporate this code into other products
# for purposes authorized by the license agreement provided they include
# this notice and the associated copyright notice with any such product.
# The information in this file is provided "AS IS" without warranty.
#
#ident "@(#)ipx 1.4"
#
: ${OK=0} ${FAIL=1} ${RELINK=2}
PATH=/bin:/usr/bin:/etc:/etc/conf/bin:"$PATH"
IPX_NETCONFIGDIR=/usr/lib/netcfg/bin
LOWER_PRD=$1
LOWER_IF=$2
UPPER_PRD=$3
UPPER_IF=$4
CONFIGURE=$5
NWCM=/usr/sbin/nwcm
. $IPX_NETCONFIGDIR/ipx.sh
tmpdir=${TMPDIR:-/tmp}
tmp=$tmpdir/ipx$$
##############################################################################
#
# main()
#
trap "cleanup $FAIL" 1 2 3 15
cd /
# netconfig set CONFIGURE to N if the chain being removed is not the last
# IPX chain.
#
if [ "${CONFIGURE}" = "Y" ]
then
$NWCM -s ipx_start_at_boot=no >/dev/null 2>&1
fi
# Since we don't pkgrm ipx/spx in the netcfg scripts whether this
# is the last removal is irrelevant
#
if [ "${LOWER_PRD}" = "-" ]
then
# A product above us (ie. NUC) has just been deinstalled.
# We have nothing to do in this case, so just return.
cleanup $OK
fi
save_config
_adapter=/dev/$LOWER_PRD
configfile=${tmp}ipx.out
touch $configfile
$IPX_NETCONFIGDIR/ipx.uc $configfile REMOVE $_adapter $_interface
UC_RET=$?
cleanup $UC_RET