Bug 53964 - ifup-routes allows blanks but no tabs after the device name in static-routes
ifup-routes allows blanks but no tabs after the device name in static-routes
Status: CLOSED RAWHIDE
Product: Red Hat Public Beta
Classification: Retired
Component: initscripts (Show other bugs)
roswell
All Linux
medium Severity low
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-09-24 12:59 EDT by Cord Kielhorn
Modified: 2014-03-16 22:23 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-09-24 12:59:47 EDT
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 Cord Kielhorn 2001-09-24 12:59:43 EDT
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-24 23:32:02 EST
Will be fixed in 6.51-1, thanks!

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