summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/connman/connman-conf
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/connman/connman-conf')
-rw-r--r--meta/recipes-connectivity/connman/connman-conf/qemuall/main.conf3
-rw-r--r--meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup16
-rw-r--r--meta/recipes-connectivity/connman/connman-conf/qemuall/wired.config8
3 files changed, 24 insertions, 3 deletions
diff --git a/meta/recipes-connectivity/connman/connman-conf/qemuall/main.conf b/meta/recipes-connectivity/connman/connman-conf/qemuall/main.conf
deleted file mode 100644
index 01973e7f71..0000000000
--- a/meta/recipes-connectivity/connman/connman-conf/qemuall/main.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-[General]
-
-NetworkInterfaceBlacklist = eth
diff --git a/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup b/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup
new file mode 100644
index 0000000000..135a6c19ac
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+CONFIGF=/var/lib/connman/wired.config
+
+# Extract wired network config from /proc/cmdline
+NET_CONF=`cat /proc/cmdline |sed -ne 's/^.*ip=\([^ ]*\):\([^ ]*\):\([^ ]*\):\([^ ]*\).*$/\1\/\4\/\3/p'`
+
+# Check if eth0 is already set via kernel cmdline
+if [ "x$NET_CONF" = "x" ]; then
+ # Wired interface is not configured via kernel cmdline
+ # Remove connman config file template
+ rm ${CONFIGF}
+else
+ # Setup a connman config accordingly
+ sed -i -e "s|^\(IPv4 =\)|\1 ${NET_CONF}|" ${CONFIGF}
+fi
diff --git a/meta/recipes-connectivity/connman/connman-conf/qemuall/wired.config b/meta/recipes-connectivity/connman/connman-conf/qemuall/wired.config
new file mode 100644
index 0000000000..996e429e72
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman-conf/qemuall/wired.config
@@ -0,0 +1,8 @@
+[global]
+Name = Wired
+Description = Wired network configuration
+
+[service_ethernet]
+Type = ethernet
+IPv4 =
+MAC = 52:54:00:12:34:56