]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Fixed BOOTIF for converting mac addr to lowercase
authorSrinivasa T N <seenutn@linux.vnet.ibm.com>
Wed, 27 Jun 2012 05:59:13 +0000 (11:29 +0530)
committerHarald Hoyer <harald@redhat.com>
Fri, 29 Jun 2012 10:41:27 +0000 (12:41 +0200)
The patch, acfab373 - Handle upper case MAC addresses in ifname
option,takes care of only the MAC conversion to lower case in the
interface name.  But the same has to be taken care for BOOTIF also.
This patch takes care of changing the BOOTIF to lower case.

Note that sed has been used in the patch instead of tr, as it is not
compulsion to install tr by dracut in the initramfs and may not be
available always.

Signed-off-by: Srinivasa T N (seenutn@linux.vnet.ibm.com)
>From 2ec9c91adbf808dbad9bdd2057d9df55a62b711f Mon Sep 17 00:00:00 2001
From: Srinivasa T N <seenutn@linux.vnet.ibm.com>
Date: Wed, 27 Jun 2012 11:20:13 +0530
Subject: [PATCH] Fixed BOOTIF for converting mac addr to lowercase

modules.d/40network/net-genrules.sh

index 867abcf00a7fb4b52bc006381dc0484f9f05054a..3bb5d8079a845bbf6ab80abb6808a5e7d1040639 100755 (executable)
@@ -10,7 +10,8 @@ fix_bootif() {
     macaddr=${macaddr%:}
     # strip hardware type field from pxelinux
     [ -n "${macaddr%??:??:??:??:??:??}" ] && macaddr=${macaddr#??:}
-    echo $macaddr
+    # return macaddr with lowercase alpha characters expected by udev
+    echo $macaddr | sed 'y/ABCDEF/abcdef/'
 }
 
 # Don't continue if we don't need network