]> git.pld-linux.org Git - projects/rc-scripts.git/blob - sysconfig/network-scripts/ifup-ipx
- preparation for upcoming 0.4.0.1 release
[projects/rc-scripts.git] / sysconfig / network-scripts / 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 . /etc/sysconfig/network-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 /etc/sysconfig/network-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
46                ip link set $DEVICE up
47                /sbin/ipx_interface add $primary $DEVICE $frametype \
48                    $(eval echo $(echo \$`echo IPXNETNUM_$framename`))
49                ;;
50         esac
51 done
52
53 exit 0
54
55 # This must be last line !
56 # vi:syntax=sh:tw=78:ts=8:sw=4
This page took 0.037165 seconds and 3 git commands to generate.