Bug 53964 - ifup-routes allows blanks but no tabs after the device name in static-routes
Summary: ifup-routes allows blanks but no tabs after the device name in static-routes
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Public Beta
Classification: Retired
Component: initscripts
Version: roswell
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-09-24 16:59 UTC by Cord Kielhorn
Modified: 2014-03-17 02:23 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-09-24 16:59:47 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2002:022 0 normal SHIPPED_LIVE New initscripts packages available for Red Hat Linux 7.2 2002-02-06 05:00:00 UTC

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!


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