Bug 23198 - ifup-ipx deuglification
ifup-ipx deuglification
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
7.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-01-02 19:05 EST by Matthew Kirkwood
Modified: 2014-03-16 22:17 EDT (History)
1 user (show)

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


Attachments (Terms of Use)

  None (edit)
Description Matthew Kirkwood 2001-01-02 19:05:28 EST
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 17:24:40 EST
Added in 5.60-1; thanks!
Comment 2 Matthew Kirkwood 2002-08-31 07:37:00 EDT
testing, sorry to bother you

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