Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 0c0774ac2c413cef3a2dc2d0db236961 > files > 80

initscripts-9.30.1-1.fc15.i686.rpm

#!/bin/bash
# configures IPX on $1 if appropriate

PATH=/sbin:/usr/sbin:/bin:/usr/bin

if [ "$1" = "" ]; then
	echo $"usage: $0 <net-device>"
	exit 1
fi

# cannot configure IPX with non-existent utilities
[ -x /sbin/ipx_interface ] || exit 0

. /etc/sysconfig/network

case $IPX in yes|true) ;; *) exit 0 ;; esac

cd /etc/sysconfig/network-scripts
. ./network-functions

CONFIG=$1
[ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG
source_config

for frametype in 802.2 802.3 ETHERII SNAP ; do
    framename=${frametype/./_}
    eval ACT=\$IPXACTIVE_$framename
    case $ACT in
	yes|true)
		eval PRIM=\$IPXPRIMARY_$framename
		case $PRIM in
		    yes|true) primary=-p ;;
		    *) primary= ;;
		esac
		eval NUM=\$IPXNETNUM_$framename
		/sbin/ipx_interface add $primary $1 $frametype $NUM
		;;
    esac
done

exit 0