[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 2/2] If network --device=MAC is given, translate to device name (#185522).



---
 loader/net.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/loader/net.c b/loader/net.c
index bebabcd..5531923 100644
--- a/loader/net.c
+++ b/loader/net.c
@@ -1568,7 +1568,12 @@ void setKickstartNetwork(struct loaderData_s * loaderData, int argc,
 
     if (!noksdev) {
         if (device) {
-            loaderData->netDev = strdup(device);
+            /* If --device=MAC was given, translate into a device name now. */
+            if (index(device, ':') != NULL)
+                loaderData->netDev = iface_mac2device(device);
+            else
+                loaderData->netDev = strdup(device);
+
             loaderData->netDev_set = 1;
         }
 
-- 
1.6.1.3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]