Bug 8407 - ifup-ipx does not work properly
ifup-ipx does not work properly
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
6.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-01-12 12:02 EST by Gary Gordhamer
Modified: 2014-03-16 22:12 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-01-13 10:43:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Gary Gordhamer 2000-01-12 12:02:10 EST
The ifup-ipx script is used to bind IPX to a NIC at startup.  The script
has two small bugs in it that cause it to fail.  First it looks to /usr/bin
for the ipx_interface command which is located under /sbin in RedHat 6.1.
Second there is a small paramater passing error on the ipx_interface
command line.  The $primary should be the 2nd parameter on the command
line, it is listed as the third in the script that shipped with RedHat.

Here is a copy of the "modified" working script:

/etc/sysconfig/network-scripts/ifup-ipx

#!/bin/bash
# configures IPX on $1 if appropriate

PATH=/sbin:/usr/sbin:/bin:/usr/bin

if [ "$1" = "" ]; then
	echo "usage: $0 <net-device>"
	exit 1
fi

if [ ! -x /sbin/ipx_interface ] ; then
	# cannot configure IPX with non-existant utilities
	exit 0
fi

. /etc/sysconfig/network

case $IPX in yes|true) ;; *) exit 0 ;; esac

cd /etc/sysconfig/network-scripts
. network-functions

CONFIG=$1
[ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG
source_config

for frametype in 802.2 802.3 ETHERII SNAP ; do
    # Yes, this kind of evaluation is really necessary to do this.
    # Welcome to shell programming...  No, we were not smoking some
    # particularly good floppies while we wrote this.  :-)
    framename=$(echo $frametype | sed 's/\./_/')
    case $(eval echo $(echo \$`echo IPXACTIVE_$framename`)) in
	yes|true)
		case $(eval echo $(echo \$`echo IPXPRIMARY_$framename`)) in
		    yes|true) primary=-p ;;
		    *) primary= ;;
		esac
		/sbin/ipx_interface add $primary $1 $frametype \
		  $(eval echo $(echo \$`echo IPXNETNUM_$framename`))
		;;
    esac
done

exit 0
Comment 1 kovalenko 2000-01-13 07:48:59 EST
ifup-ipx never starts on boot for <net-device>, if
/etc/sysconfig/network-scripts/ifcfg-<net-device> has a string BOOTPROTO="dhcp".
Error in /sbin/ifup: string  . /etc/sysconfig/network _must_be outside "if"
construct.
Comment 2 Bill Nottingham 2000-01-13 10:43:59 EST
The path to ipx_* was fixed in the errata initscripts release.

The rest should be fixed in initscripts-4.83, which
will be in the next Raw Hide release.

Note You need to log in before you can comment on or make changes to this bug.