Bug 60248 - ifup-aliases doesn't filter out ifcfg-ethn:n backup files
ifup-aliases doesn't filter out ifcfg-ethn:n backup files
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
  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:
Last Closed: 2002-02-25 12:56:08 EST
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 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:

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