Bug 60248

Summary: ifup-aliases doesn't filter out ifcfg-ethn:n backup files
Product: [Retired] Red Hat Linux Reporter: Andres Grino <agrino>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: low Docs Contact:
Priority: medium    
Version: 7.2CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-02-25 17:56:08 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:
Attachments:
Description Flags
Patch to prevent reading configuration from backup files none

Description Andres Grino 2002-02-22 20:12:49 UTC
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 13:19:23 UTC
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 15:04:27 UTC
Created attachment 46500 [details]
Patch to prevent reading configuration from backup files

Comment 3 Bill Nottingham 2002-04-12 20:15:06 UTC
Fixed in 6.63-1.