]> git.pld-linux.org Git - projects/rc-scripts.git/blame - lib/ifup-ipx
remove $Id$ lines
[projects/rc-scripts.git] / lib / ifup-ipx
CommitLineData
6955eb97 1#!/bin/sh
b0443108 2#
b0443108 3#
7742e157
AF
4# configures IPX on $1 if appropriate
5
de1fc6ce
JR
6. /etc/sysconfig/network
7. /etc/rc.d/init.d/functions
f67ce454 8. /lib/rc-scripts/functions.network
de1fc6ce 9
7742e157
AF
10PATH=/sbin:/usr/sbin:/bin:/usr/bin
11
12if [ "$1" = "" ]; then
5e6dfc29
JR
13 nls "Usage: %s <device name>" "ifup-ipx" >&2
14 exit 1
7742e157
AF
15fi
16
de1fc6ce 17if is_no "$IPX"; then
5e6dfc29 18 exit 0
7742e157
AF
19fi
20
f6e719eb 21if [ ! -x /sbin/ipx_interface ] ; then
5e6dfc29
JR
22 nls "%s is missing. Can't continue." "/sbin/ipx_interface"
23 exit 1
de1fc6ce 24fi
7742e157 25
f67ce454 26cd /lib/rc-scripts
7742e157
AF
27
28CONFIG=$1
12de71be 29[ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG
7742e157
AF
30source_config
31
de1fc6ce
JR
32# set all major variables
33setup_ip_param
34
35# add ipx for all frame types
36for frametype in '802.2' '802.2TR' '802.3' 'EtherII' 'SNAP'; do
5e6dfc29 37 framename=$(echo $frametype | awk ' { gsub(/\./,"_"); print $0 } ')
bf14fcab 38 case $(eval echo $(echo \$$(echo IPXACTIVE_$framename))) in
5e6dfc29 39 yes|true)
bf14fcab 40 case $(eval echo $(echo \$$(echo IPXPRIMARY_$framename))) in
5e6dfc29
JR
41 yes|true) primary="-p" ;;
42 *) primary= ;;
43 esac
44 ip link set $DEVICE up
45 /sbin/ipx_interface add $primary $DEVICE $frametype \
bf14fcab 46 $(eval echo $(echo \$$(echo IPXNETNUM_$framename)))
5e6dfc29
JR
47 ;;
48 esac
de1fc6ce 49done
7742e157
AF
50
51exit 0
This page took 0.082502 seconds and 4 git commands to generate.