Bug 5335

Summary: spaces in ifcfg- file name confuse network-up service
Product: Mageia Reporter: Guillaume Rousse <guillomovitch>
Component: RPM PackagesAssignee: Colin Guthrie <mageia>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: mageia, tmb
Version: Cauldron   
Target Milestone: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Source RPM: initscripts CVE:
Status comment:

Description Guillaume Rousse 2012-04-10 19:38:45 CEST
My logs are full of the following error message:
Apr 10 16:11:14 localhost network-up[7653]: fgrep: ifcfg-ifcfg-Auto_orange1: Aucun fichier ou dossier de ce type

Actually, the complex sed expression in line 36 of network-up service is confused with filenames with space inside, such as 'ifcfg-Auto_orange 1', resulting in the ifcfg prefix not being stripped. Adding a space to the character class in regexp from line 39 is enough to fix the issue:
 -e '/ifcfg-[A-Za-z0-9\._-]\+$/ { s/^ifcfg-//g;s/[0-9]/ &/}' | \ ->
 -e '/ifcfg-[ A-Za-z0-9\._-]\+$/ { s/^ifcfg-//g;s/[0-9]/ &/}' | \
Comment 1 Manuel Hiebel 2012-04-11 00:10:24 CEST
I have not follow your discussion on irc but i guess it's alredy fixed no

CC: (none) => mageia, tmb

Comment 2 Colin Guthrie 2012-04-11 00:40:30 CEST
Yeah I have a patch in the pipeline.

Status: NEW => ASSIGNED
Assignee: bugsquad => mageia

Comment 3 Colin Guthrie 2012-04-27 01:43:19 CEST
Forgot about this one but I pushed a patch for it the other day.

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED