source: projects/initscripts/tags/initscripts-8.91.0/sysconfig/network-scripts/ifup-ipx @ 2576

Revision 2576, 851 bytes checked in by daisuke, 13 years ago (diff)

tagging as initscripts-8.91.0

Line 
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
11# cannot configure IPX with non-existent utilities
12[ -x /sbin/ipx_interface ] || exit 0
13
14. /etc/sysconfig/network
15
16case $IPX in yes|true) ;; *) exit 0 ;; esac
17
18cd /etc/sysconfig/network-scripts
19. /etc/sysconfig/network-scripts/network-functions
20
21CONFIG=$1
22[ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG
23source_config
24
25for frametype in 802.2 802.3 ETHERII SNAP ; do
26    framename=$(echo $frametype | sed 's/\./_/')
27    eval ACT=\$IPXACTIVE_$framename
28    case $ACT in
29        yes|true)
30                eval PRIM=\$IPXPRIMARY_$framename
31                case $PRIM in
32                    yes|true) primary=-p ;;
33                    *) primary= ;;
34                esac
35                eval NUM=\$IPXNETNUM_$framename
36                /sbin/ipx_interface add $primary $1 $frametype $NUM
37                ;;
38    esac
39done
40
41exit 0
Note: See TracBrowser for help on using the repository browser.