]> git.pld-linux.org Git - projects/rc-scripts.git/blob - lib/ifup-ipx
- devtmpfs is madatory for udev >= 176
[projects/rc-scripts.git] / lib / ifup-ipx
1 #!/bin/sh
2 #
3 #       $Id$
4 #
5 # configures IPX on $1 if appropriate
6
7 . /etc/sysconfig/network
8 . /etc/rc.d/init.d/functions
9 . /lib/rc-scripts/functions.network
10
11 PATH=/sbin:/usr/sbin:/bin:/usr/bin
12
13 if [ "$1" = "" ]; then
14         nls "Usage: %s <device name>" "ifup-ipx" >&2
15         exit 1
16 fi
17
18 if is_no "$IPX"; then
19         exit 0
20 fi
21
22 if [ ! -x /sbin/ipx_interface ] ; then
23         nls "%s is missing. Can't continue." "/sbin/ipx_interface"
24         exit 1
25 fi
26
27 cd /lib/rc-scripts
28
29 CONFIG=$1
30 [ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG
31 source_config
32
33 # set all major variables
34 setup_ip_param
35
36 # add ipx for all frame types
37 for 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                 ip link set $DEVICE up
46                 /sbin/ipx_interface add $primary $DEVICE $frametype \
47                         $(eval echo $(echo \$$(echo IPXNETNUM_$framename)))
48                 ;;
49         esac
50 done
51
52 exit 0
This page took 0.039954 seconds and 3 git commands to generate.