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

[Libguestfs] [PATCH 1/2] appliance init: find NIC name for dhcpcd



dhcpcd requires an interface name as parameter to work. We are now
getting it from /proc/sys/net/ipv4/conf/ folder children.
---
 appliance/init | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/appliance/init b/appliance/init
index cca62e7..ef18959 100755
--- a/appliance/init
+++ b/appliance/init
@@ -111,7 +111,8 @@ if test "$guestfs_network" = 1; then
     if dhclient --version >/dev/null 2>&1; then
         dhclient
     else
-        dhcpcd
+        iface=$(ls -I all -I default -I lo /proc/sys/net/ipv4/conf)
+        dhcpcd $iface
     fi
 fi
 
-- 
2.1.4


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