Bug 53964

Summary: ifup-routes allows blanks but no tabs after the device name in static-routes
Product: [Retired] Red Hat Public Beta Reporter: Cord Kielhorn <kielhorn>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: low Docs Contact:
Priority: medium    
Version: roswellCC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-09-24 16:59:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Cord Kielhorn 2001-09-24 16:59:43 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20010917

Description of problem:
The ifup-routes script greps through static-routes for lines concerning the
requested interface. To guard against lines beginning with an alias
interface it uses the pattern "^$DEVICE ". By doing this it forces the user
to separate the device name and the following route arguments with spaces.
It is not possible to use tabs, as one expects for that kind of config
file. This is a longstanding annoyance which was already present in at
least RHL 6.2.

Version-Release number of selected component (if applicable):
At least 6.20 - 6.39

How reproducible:
Always

Steps to Reproduce:
1. Write an entry like "eth0<tab>rest of the line" to static-routes
2. Do "ifup eth0"



Actual Results:  The expected route is not set.


Expected Results:  The route should be set.


Patch:
--- ifup-routes~	Fri May 11 18:38:25 2001
+++ ifup-routes	Mon Sep 24 18:16:27 2001
@@ -18,9 +18,9 @@
 DEVICE=$1
 
 #note the trailing space in the grep gets rid of aliases
-grep "^$DEVICE " /etc/sysconfig/static-routes | while read device args; do
+grep "^$DEVICE[[:space:]]" /etc/sysconfig/static-routes | while read
device args; do
 	/sbin/route add -$args $device
 done
-grep "^any " /etc/sysconfig/static-routes | while read ignore args ; do
+grep "^any" /etc/sysconfig/static-routes | while read ignore args ; do
         /sbin/route add -$args
 done

Comment 1 Bill Nottingham 2002-01-25 04:32:02 UTC
Will be fixed in 6.51-1, thanks!