]> git.pld-linux.org Git - projects/rc-scripts.git/blame - sysconfig/network-scripts/ifup-ipx
- merge my private tree
[projects/rc-scripts.git] / sysconfig / network-scripts / ifup-ipx
CommitLineData
6955eb97 1#!/bin/sh
b0443108 2#
7824432b 3# $Id: ifup-ipx,v 1.9.2.2 2001/09/30 10:19:42 misiek Exp $
b0443108 4#
7742e157
AF
5# configures IPX on $1 if appropriate
6
a04d924e
AM
7. /etc/sysconfig/network
8. /etc/rc.d/init.d/functions
7824432b 9. /etc/sysconfig/network-scripts/functions.network
a04d924e 10
7742e157
AF
11PATH=/sbin:/usr/sbin:/bin:/usr/bin
12
13if [ "$1" = "" ]; then
a04d924e 14 nls "usage: %s <device name>" "ifup-ipx" >&2
7742e157
AF
15 exit 1
16fi
17
a04d924e 18if is_no "$IPX"; then
7742e157
AF
19 exit 0
20fi
21
a04d924e
AM
22if [ ! -x /usr/bin/ipx_interface ] ; then
23 nls "%s is missing. Can't continue." "/usr/bin/ipx_interface"
24 exit 1
25fi
7742e157
AF
26
27cd /etc/sysconfig/network-scripts
7742e157
AF
28
29CONFIG=$1
12de71be 30[ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG
7742e157
AF
31source_config
32
a04d924e
AM
33# set all major variables
34setup_ip_param
35
36# add ipx for all frame types
37for frametype in '802.2' '802.2TR' '802.3' 'EtherII' 'SNAP'; do
38 framename=$(echo $frametype | awk ' { gsub(/\./,"_"); print $0 } ')
39 case $(eval echo $(echo \$`echo IPXACTIVE_$framename`)) in
40 yes|true)
41 case $(eval echo $(echo \$`echo IPXPRIMARY_$framename`)) in
42 yes|true) primary="-p" ;;
43 *) primary= ;;
44 esac
45
46 ip link set $DEVICE up
47 /usr/bin/ipx_interface add $primary $DEVICE $frametype \
48 $(eval echo $(echo \$`echo IPXNETNUM_$framename`))
49 ;;
50 esac
51done
065d2c6a 52
a04d924e 53exit 0
03f9cfee 54
7742e157 55
a04d924e
AM
56# This must be last line !
57# vi:syntax=sh:tw=78:ts=8:sw=4
7742e157 58
This page took 0.097685 seconds and 4 git commands to generate.