]>
Commit | Line | Data |
---|---|---|
7742e157 AF |
1 | #!/bin/bash |
2 | # configures IPX on $1 if appropriate | |
3 | ||
4 | PATH=/sbin:/usr/sbin:/bin:/usr/bin | |
5 | ||
6 | if [ "$1" = "" ]; then | |
7 | echo "usage: $0 <net-device>" | |
8 | exit 1 | |
9 | fi | |
10 | ||
11 | if [ ! -x /usr/bin/ipx_interface ] ; then | |
12 | # cannot configure IPX with non-existant utilities | |
13 | exit 0 | |
14 | fi | |
15 | ||
16 | . /etc/sysconfig/network | |
17 | ||
18 | case $IPX in yes|true) ;; *) exit 0 ;; esac | |
19 | ||
20 | cd /etc/sysconfig/network-scripts | |
21 | ||
22 | . network-functions | |
23 | ||
24 | CONFIG=$1 | |
25 | source_config | |
26 | ||
27 | for 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 | |
41 | done | |
42 | ||
43 | exit 0 | |
44 |