Bug 1455419 - ifcfg-* should exclude .old extension __sed_discard_ignored_files
Summary: ifcfg-* should exclude .old extension __sed_discard_ignored_files
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: initscripts
Version: 7.3
Hardware: All
OS: Linux
medium
low
Target Milestone: rc
: ---
Assignee: David Kaspar [Dee'Kej]
QA Contact: Daniel Rusek
Petr Bokoc
URL:
Whiteboard:
Depends On:
Blocks: 1465901
TreeView+ depends on / blocked
 
Reported: 2017-05-25 05:38 UTC by Jozef Mlich
Modified: 2018-04-10 18:26 UTC (History)
3 users (show)

Fixed In Version: initscripts-9.49.40-2.el7
Doc Type: Bug Fix
Doc Text:
Files with the `.old` extension are now ignored by network scripts Network scripts in Red Hat Enterprise Linux contain a regular expression which causes them to ignore `ifcfg-*` configuration files with certain extensions, such as `.bak`, `.rpmnew` or `.rpmold`. However, the `.old` extension was missing from this set, despite being used in documentation and in common practice. This update adds the `.old` extension into the list, which ensures that script files which use it will be ignored by network scripts as expected.
Clone Of:
Environment:
Last Closed: 2018-04-10 18:24:45 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0983 None None None 2018-04-10 18:26:24 UTC

Description Jozef Mlich 2017-05-25 05:38:52 UTC
In documentation is specifically said:

It is recommended not to store backup ifcfg files in the same location as the live ones. The script literally does ifcfg-* with an exclude only for these extensions: .old, .orig, .rpmnew, .rpmorig, and .rpmsave. The best way is not to store backup files anywhere within the /etc/ directory. 

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/sec-Network_Configuration_Using_sysconfig_Files.html

The /etc/sysconfig/network-scripts/network-functions is using /etc/init.d/functions namely variable __sed_discard_ignored_files:

__sed_discard_ignored_files='/\(~\|\.bak\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d'

This caused rhbz#1381314 rhbz#83126 . Please fix initscripts package or documentation.

Comment 2 David Kaspar [Dee'Kej] 2017-05-25 08:55:58 UTC
Hello Jozef,

thanks for the report. Unfortunately it's too late to fix this in RHEL-7.4.
I'm proposing this for RHEL-7.5. I believe you will be able to workaround this yourself in the meantime. ;)

Best regards,

Dee'Kej

Comment 3 David Kaspar [Dee'Kej] 2017-10-30 17:18:35 UTC
Already fixed in upstream:
https://github.com/fedora-sysv/initscripts/commit/0fe96e5f3705d5c7e968d5fe0698

Comment 9 errata-xmlrpc 2018-04-10 18:24:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0983


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