]>
Commit | Line | Data |
---|---|---|
6955eb97 | 1 | #!/bin/sh |
b0443108 | 2 | # |
baa6b418 | 3 | # $Id: ifup-ipx,v 1.13 2002/05/11 09:50:53 misiek Exp $ |
b0443108 | 4 | # |
7742e157 AF |
5 | # configures IPX on $1 if appropriate |
6 | ||
de1fc6ce JR |
7 | . /etc/sysconfig/network |
8 | . /etc/rc.d/init.d/functions | |
baa6b418 | 9 | . /etc/sysconfig/network-scripts/functions.network |
de1fc6ce | 10 | |
7742e157 AF |
11 | PATH=/sbin:/usr/sbin:/bin:/usr/bin |
12 | ||
13 | if [ "$1" = "" ]; then | |
95a724b3 | 14 | nls "Usage: %s <device name>" "ifup-ipx" >&2 |
7742e157 AF |
15 | exit 1 |
16 | fi | |
17 | ||
de1fc6ce | 18 | if is_no "$IPX"; then |
7742e157 AF |
19 | exit 0 |
20 | fi | |
21 | ||
f6e719eb PG |
22 | if [ ! -x /sbin/ipx_interface ] ; then |
23 | nls "%s is missing. Can't continue." "/sbin/ipx_interface" | |
de1fc6ce JR |
24 | exit 1 |
25 | fi | |
7742e157 AF |
26 | |
27 | cd /etc/sysconfig/network-scripts | |
7742e157 AF |
28 | |
29 | CONFIG=$1 | |
12de71be | 30 | [ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG |
7742e157 AF |
31 | source_config |
32 | ||
de1fc6ce JR |
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 | |
f6e719eb | 47 | /sbin/ipx_interface add $primary $DEVICE $frametype \ |
de1fc6ce JR |
48 | $(eval echo $(echo \$`echo IPXNETNUM_$framename`)) |
49 | ;; | |
50 | esac | |
51 | done | |
7742e157 AF |
52 | |
53 | exit 0 | |
54 | ||
de1fc6ce JR |
55 | # This must be last line ! |
56 | # vi:syntax=sh:tw=78:ts=8:sw=4 |