#!/bin/sh
#
# This script is run by the pppd after the link is established and
# the IPX layer is brought up.
#
# This script is called with the following arguments:
#    Arg  Name                          Example
#    $1   Interface name                ppp0
#    $2   The tty                       ttyS1
#    $3   The link speed                38400
#    $4   IPX network number
#    $5   Local IPX node address
#    $6   Remote IPX node address
#    $7   Local IPX routing protocol
#    $8   Remote IPX routing protocol
#    $9   Local IPX router name
#    $10  Remote IPX router name
#    $11  Optional ipparam parameter

# hardy's hack
echo "if /sbin/ifconfig $1 |grep -c IPX >/dev/null ; then true ; else " >/etc/ppp/ipx-wa
echo "/usr/bin/ipx_interface add $1 EtherII $4 $5" >> /etc/ppp/ipx-wa
echo fi >> /etc/ppp/ipx-wa
# hardy's hack

killall -HUP ipxd
