diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 14:36:22 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 15:32:53 +0200 |
commit | f4cf9fe05bb3f32fabea4e54dd92d368967a80da (patch) | |
tree | 487180fa9866985ea7b28e625651765d86f515c3 /meta/recipes-connectivity/connman/connman | |
download | poky-f4cf9fe05bb3f32fabea4e54dd92d368967a80da.tar.gz |
initial commit for Enea Linux 4.0
Migrated from the internal git server on the daisy-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-connectivity/connman/connman')
3 files changed, 139 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/connman/connman/0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch b/meta/recipes-connectivity/connman/connman/0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch new file mode 100644 index 0000000000..e6f03e632e --- /dev/null +++ b/meta/recipes-connectivity/connman/connman/0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 4ddaf78dad5a9ee4a0658235f71b75132192123e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 7 Apr 2012 18:52:12 -0700 | ||
4 | Subject: [PATCH] plugin.h: Change visibility to default for debug symbols | ||
5 | |||
6 | gold refuses to link in undefined weak symbols which | ||
7 | have hidden visibility | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | |||
11 | |||
12 | Upstream-Status: Pending | ||
13 | --- | ||
14 | include/plugin.h | 4 ++-- | ||
15 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/include/plugin.h b/include/plugin.h | ||
18 | index 692a4e5..a9361c3 100644 | ||
19 | --- a/include/plugin.h | ||
20 | +++ b/include/plugin.h | ||
21 | @@ -89,9 +89,9 @@ struct connman_plugin_desc { | ||
22 | #else | ||
23 | #define CONNMAN_PLUGIN_DEFINE(name, description, version, priority, init, exit) \ | ||
24 | extern struct connman_debug_desc __start___debug[] \ | ||
25 | - __attribute__ ((weak, visibility("hidden"))); \ | ||
26 | + __attribute__ ((weak, visibility("default"))); \ | ||
27 | extern struct connman_debug_desc __stop___debug[] \ | ||
28 | - __attribute__ ((weak, visibility("hidden"))); \ | ||
29 | + __attribute__ ((weak, visibility("default"))); \ | ||
30 | extern struct connman_plugin_desc connman_plugin_desc \ | ||
31 | __attribute__ ((visibility("default"))); \ | ||
32 | struct connman_plugin_desc connman_plugin_desc = { \ | ||
33 | -- | ||
34 | 1.7.5.4 | ||
35 | |||
diff --git a/meta/recipes-connectivity/connman/connman/add_xuser_dbus_permission.patch b/meta/recipes-connectivity/connman/connman/add_xuser_dbus_permission.patch new file mode 100644 index 0000000000..707b3cafba --- /dev/null +++ b/meta/recipes-connectivity/connman/connman/add_xuser_dbus_permission.patch | |||
@@ -0,0 +1,21 @@ | |||
1 | Because Poky doesn't support at_console we need to special-case the session | ||
2 | user. | ||
3 | |||
4 | Upstream-Status: Inappropriate [configuration] | ||
5 | |||
6 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
7 | |||
8 | diff --git a/src/connman-dbus.conf b/src/connman-dbus.conf | ||
9 | index 98a773e..466809c 100644 | ||
10 | --- a/src/connman-dbus.conf | ||
11 | +++ b/src/connman-dbus.conf | ||
12 | @@ -8,6 +8,9 @@ | ||
13 | <allow send_interface="net.connman.Counter"/> | ||
14 | <allow send_interface="net.connman.Notification"/> | ||
15 | </policy> | ||
16 | + <policy user="xuser"> | ||
17 | + <allow send_destination="net.connman"/> | ||
18 | + </policy> | ||
19 | <policy at_console="true"> | ||
20 | <allow send_destination="net.connman"/> | ||
21 | </policy> | ||
diff --git a/meta/recipes-connectivity/connman/connman/connman b/meta/recipes-connectivity/connman/connman/connman new file mode 100644 index 0000000000..bf7a94a06d --- /dev/null +++ b/meta/recipes-connectivity/connman/connman/connman | |||
@@ -0,0 +1,83 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | DAEMON=/usr/sbin/connmand | ||
4 | PIDFILE=/var/run/connmand.pid | ||
5 | DESC="Connection Manager" | ||
6 | |||
7 | if [ -f /etc/default/connman ] ; then | ||
8 | . /etc/default/connman | ||
9 | fi | ||
10 | |||
11 | set -e | ||
12 | |||
13 | nfsroot=0 | ||
14 | |||
15 | exec 9<&0 < /proc/mounts | ||
16 | while read dev mtpt fstype rest; do | ||
17 | if test $mtpt = "/" ; then | ||
18 | case $fstype in | ||
19 | nfs | nfs4) | ||
20 | nfsroot=1 | ||
21 | break | ||
22 | ;; | ||
23 | *) | ||
24 | ;; | ||
25 | esac | ||
26 | fi | ||
27 | done | ||
28 | |||
29 | do_start() { | ||
30 | EXTRA_PARAM="" | ||
31 | if test $nfsroot -eq 1 ; then | ||
32 | NET_DEVS=`cat /proc/net/dev | sed -ne 's/^\([a-zA-Z0-9 ]*\):.*$/\1/p'` | ||
33 | NET_ADDR=`cat /proc/cmdline | sed -ne 's/^.*ip=\([^ :]*\).*$/\1/p'` | ||
34 | |||
35 | if [ ! -z "$NET_ADDR" ]; then | ||
36 | if [ "$NET_ADDR" = dhcp ]; then | ||
37 | ethn=`ifconfig | grep "^eth" | sed -e "s/\(eth[0-9]\)\(.*\)/\1/"` | ||
38 | if [ ! -z "$ethn" ]; then | ||
39 | EXTRA_PARAM="-I $ethn" | ||
40 | fi | ||
41 | else | ||
42 | for i in $NET_DEVS; do | ||
43 | ADDR=`ifconfig $i | sed 's/addr://g' | sed -ne 's/^.*inet \([0-9.]*\) .*$/\1/p'` | ||
44 | if [ "$NET_ADDR" = "$ADDR" ]; then | ||
45 | EXTRA_PARAM="-I $i" | ||
46 | break | ||
47 | fi | ||
48 | done | ||
49 | fi | ||
50 | fi | ||
51 | fi | ||
52 | if [ -f @LIBDIR@/connman/wired-setup ] ; then | ||
53 | . @LIBDIR@/connman/wired-setup | ||
54 | fi | ||
55 | $DAEMON $EXTRA_PARAM | ||
56 | } | ||
57 | |||
58 | do_stop() { | ||
59 | start-stop-daemon --stop --name connmand --quiet | ||
60 | } | ||
61 | |||
62 | case "$1" in | ||
63 | start) | ||
64 | echo "Starting $DESC" | ||
65 | do_start | ||
66 | ;; | ||
67 | stop) | ||
68 | echo "Stopping $DESC" | ||
69 | do_stop | ||
70 | ;; | ||
71 | restart|force-reload) | ||
72 | echo "Restarting $DESC" | ||
73 | do_stop | ||
74 | sleep 1 | ||
75 | do_start | ||
76 | ;; | ||
77 | *) | ||
78 | echo "Usage: $0 {start|stop|restart|force-reload}" >&2 | ||
79 | exit 1 | ||
80 | ;; | ||
81 | esac | ||
82 | |||
83 | exit 0 | ||