From e2e6f6fe07049f33cb6348780fa975162752e421 Mon Sep 17 00:00:00 2001 From: Adrian Dudau Date: Thu, 12 Dec 2013 13:38:32 +0100 Subject: initial commit of Enea Linux 3.1 Migrated from the internal git server on the dora-enea branch Signed-off-by: Adrian Dudau --- .../connman/connman-conf/qemuall/wired-setup | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup (limited to 'meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup') 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..c46899ef32 --- /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 -f ${CONFIGF} +else + # Setup a connman config accordingly + sed -i -e "s|^IPv4 =.*|IPv4 = ${NET_CONF}|" ${CONFIGF} +fi -- cgit v1.2.3-54-g00ecf