]> git.pld-linux.org Git - projects/rc-scripts.git/blame - lib/ifup-ipx
- provide stdin for the daemons that just must have it,
[projects/rc-scripts.git] / lib / ifup-ipx
CommitLineData
6955eb97 1#!/bin/sh
b0443108 2#
ec8b15cb 3# $Id$
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
f67ce454 9. /lib/rc-scripts/functions.network
de1fc6ce 10
7742e157
AF
11PATH=/sbin:/usr/sbin:/bin:/usr/bin
12
13if [ "$1" = "" ]; then
5e6dfc29
JR
14 nls "Usage: %s <device name>" "ifup-ipx" >&2
15 exit 1
7742e157
AF
16fi
17
de1fc6ce 18if is_no "$IPX"; then
5e6dfc29 19 exit 0
7742e157
AF
20fi
21
f6e719eb 22if [ ! -x /sbin/ipx_interface ] ; then
5e6dfc29
JR
23 nls "%s is missing. Can't continue." "/sbin/ipx_interface"
24 exit 1
de1fc6ce 25fi
7742e157 26
f67ce454 27cd /lib/rc-scripts
7742e157
AF
28
29CONFIG=$1
12de71be 30[ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG
7742e157
AF
31source_config
32
de1fc6ce
JR
33# set all major variables
34setup_ip_param
35
36# add ipx for all frame types
37for frametype in '802.2' '802.2TR' '802.3' 'EtherII' 'SNAP'; do
5e6dfc29 38 framename=$(echo $frametype | awk ' { gsub(/\./,"_"); print $0 } ')
bf14fcab 39 case $(eval echo $(echo \$$(echo IPXACTIVE_$framename))) in
5e6dfc29 40 yes|true)
bf14fcab 41 case $(eval echo $(echo \$$(echo IPXPRIMARY_$framename))) in
5e6dfc29
JR
42 yes|true) primary="-p" ;;
43 *) primary= ;;
44 esac
45 ip link set $DEVICE up
46 /sbin/ipx_interface add $primary $DEVICE $frametype \
bf14fcab 47 $(eval echo $(echo \$$(echo IPXNETNUM_$framename)))
5e6dfc29
JR
48 ;;
49 esac
de1fc6ce 50done
7742e157
AF
51
52exit 0
This page took 0.122446 seconds and 4 git commands to generate.