This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 60248 - ifup-aliases doesn't filter out ifcfg-ethn:n backup files
ifup-aliases doesn't filter out ifcfg-ethn:n backup files
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
7.2
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-02-22 15:12 EST by Andres Grino
Modified: 2014-03-16 22:25 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-02-25 12:56:08 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Patch to prevent reading configuration from backup files (473 bytes, patch)
2002-02-23 10:04 EST, dharris
no flags Details | Diff

  None (edit)
Description Andres Grino 2002-02-22 15:12:49 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)

Description of problem:
ifup-aliases abort processing when encounter a file ended in "~" (backup files 
left in the /etc/sysconfig/network-script)

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. cd /etc/sysconfig/network-scripts
2. cp ifcfg-eth0:0 ifcfg-eth0:0~
3. ./ifup-aliases eth0
	

Actual Results:  ifup-aliases stop processing alias after found the first *~ 
file.
So, ifup stop processing and /etc/rc.d/init.d/network stop processing.

Expected Results:  ifup-aliases must skip backup files

Additional info:

A little change can solve this problems. In ifup-aliases, line 269, where it 
says 
  for FILE in ifcfg-${parent_device}:* ; do 
I changed it to: 
  for FILE in ifcfg-${parent_device}:*[!~] ; do 
and problem solved
Comment 1 dharris 2002-02-23 08:19:23 EST
I agree that backup files should be filtered out. This is something that, from 
my experience, Red Hat tires to do. For example, the log rotator script is 
smart enough to ignore .rpmsave files.

I've created a patch that fixes this on both important shell globs in the 
source code. The first looking for ifcfg-eth0:* aliases and the second looking 
for ifcfg-eth0-range* aliases.
Comment 2 dharris 2002-02-23 10:04:27 EST
Created attachment 46500 [details]
Patch to prevent reading configuration from backup files
Comment 3 Bill Nottingham 2002-04-12 16:15:06 EDT
Fixed in 6.63-1.

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