]> git.pld-linux.org Git - projects/rc-scripts.git/blame - sysconfig/network-scripts/ifup-ipx
Initial revision
[projects/rc-scripts.git] / sysconfig / network-scripts / ifup-ipx
CommitLineData
7742e157
AF
1#!/bin/bash
2# configures IPX on $1 if appropriate
3
4PATH=/sbin:/usr/sbin:/bin:/usr/bin
5
6if [ "$1" = "" ]; then
7 echo "usage: $0 <net-device>"
8 exit 1
9fi
10
11if [ ! -x /usr/bin/ipx_interface ] ; then
12 # cannot configure IPX with non-existant utilities
13 exit 0
14fi
15
16. /etc/sysconfig/network
17
18case $IPX in yes|true) ;; *) exit 0 ;; esac
19
20cd /etc/sysconfig/network-scripts
21
22. network-functions
23
24CONFIG=$1
25source_config
26
27for frametype in 802_2 802_3 ETHERII SNAP ; do
28 # Yes, this kind of evaluation is really necessary to do this.
29 # Welcome to shell programming... No, we were not smoking some
30 # particularly good floppies while we wrote this. :-)
31 case $(eval echo $(echo \$`echo IPXACTIVE_$frametype`)) in
32 yes|true)
33 case $(eval echo $(echo \$`echo IPXPRIMARY_$frametype`)) in
34 yes|true) primary=-p ;;
35 *) primary= ;;
36 esac
37 /usr/bin/ipx_interface add $1 $primary $frametype \
38 $(eval echo $(echo \$`echo IPXNETNUM_$frametype`))
39 ;;
40 esac
41done
42
43exit 0
44
This page took 0.034329 seconds and 4 git commands to generate.