Bug 23198 - ifup-ipx deuglification
Summary: ifup-ipx deuglification
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts   
(Show other bugs)
Version: 7.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords: FutureFeature
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-01-03 00:05 UTC by Matthew Kirkwood
Modified: 2014-03-17 02:17 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-01-03 00:05:31 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Matthew Kirkwood 2001-01-03 00:05:28 UTC
Hi,

Despite what the comment claims, the author of ifup-ipx probably _was_
smoking some "good floppies" when it was written.

Here's a diff which deuglifies it somewhat (available by email if Netscape
or Bugzilla do bad things to it) by using the usual Bourne shell
associative array idiom:

--- ifup-ipx	Thu Jan 13 15:53:09 2000
+++ /home/matthew/ifup-ipx	Wed Jan  3 00:00:57 2001
@@ -25,18 +25,17 @@
 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
+    eval ACT=\$IPXACTIVE_$framename
+    case $ACT in
 	yes|true)
-		case $(eval echo $(echo \$`echo IPXPRIMARY_$framename`)) in
+		eval PRIM=\$IPXPRIMARY_$framename
+		case $PRIM in
 		    yes|true) primary=-p ;;
 		    *) primary= ;;
 		esac
-		/sbin/ipx_interface add $primary $1 $frametype \
-		  $(eval echo $(echo \$`echo IPXNETNUM_$framename`))
+		eval NUM=\$IPXNETNUM_$framename
+		/sbin/ipx_interface add $primary $1 $frametype $NUM
 		;;
     esac
 done


Cheers,
Matthew.

Comment 1 Bill Nottingham 2001-01-29 22:24:40 UTC
Added in 5.60-1; thanks!

Comment 2 Matthew Kirkwood 2002-08-31 11:37:00 UTC
testing, sorry to bother you


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