Bug 60248 - ifup-aliases doesn't filter out ifcfg-ethn:n backup files
Summary: ifup-aliases doesn't filter out ifcfg-ethn:n backup files
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts   
(Show other bugs)
Version: 7.2
Hardware: i386 Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2002-02-22 20:12 UTC by Andres Grino
Modified: 2014-03-17 02:25 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-02-25 17:56:08 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

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:

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 *~ 
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 
  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.

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