#!/bin/sh
# Begin $network-devices/services/ipx

# Based upon lfs-bootscripts-1.12 $network_devices/if{down,up}
# Rewritten by Nathan Coulson <nathan@linuxfromscratch.org>
# Adapted for ipx by DJ Lucas <dj@lucasit.com>

. /etc/sysconfig/rc || exit
. $rc_functions || exit
. $network_devices/ifconfig.$1

case $2 in
        up)
                echo "Setting up the IPX protocol on $IPXDEV"
                /sbin/ifconfig $IPXDEV up > /dev/null
                /bin/ipx_interface add $IPXDEV $FRAME &&
                /bin/ipx_configure --auto_interface=on --auto_primary=on
                evaluate_retval
        ;;

        down)
                echo "Stopping IPX on the $IPXDEV interface..."
                /bin/ipx_configure --auto_interface=off --auto_primary=off &&
                /bin/ipx_interface del $IPXDEV $FRAME
                evaluate_retval
        ;;

        *)
                echo echo "Usage: $0 [interface] {up|down}"
                exit 1
        ;;

esac

# End $network-devices/services/ipx
