summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2013-12-12 13:38:32 +0100
committerAdrian Dudau <adrian.dudau@enea.com>2013-12-12 13:50:20 +0100
commite2e6f6fe07049f33cb6348780fa975162752e421 (patch)
treeb1813295411235d1297a0ed642b1346b24fdfb12 /meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup
downloadpoky-e2e6f6fe07049f33cb6348780fa975162752e421.tar.gz
initial commit of Enea Linux 3.1
Migrated from the internal git server on the dora-enea branch Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup')
-rw-r--r--meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup16
1 files changed, 16 insertions, 0 deletions
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 @@
1#!/bin/sh
2
3CONFIGF=/var/lib/connman/wired.config
4
5# Extract wired network config from /proc/cmdline
6NET_CONF=`cat /proc/cmdline |sed -ne 's/^.*ip=\([^ ]*\):\([^ ]*\):\([^ ]*\):\([^ ]*\).*$/\1\/\4\/\3/p'`
7
8# Check if eth0 is already set via kernel cmdline
9if [ "x$NET_CONF" = "x" ]; then
10 # Wired interface is not configured via kernel cmdline
11 # Remove connman config file template
12 rm -f ${CONFIGF}
13else
14 # Setup a connman config accordingly
15 sed -i -e "s|^IPv4 =.*|IPv4 = ${NET_CONF}|" ${CONFIGF}
16fi