summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity
diff options
context:
space:
mode:
authorJoshua Lock <joshua.lock@collabora.co.uk>2016-01-27 11:23:59 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-30 11:37:00 +0000
commit79f4495244ceddb197879ae24c33f469285bbff2 (patch)
treebdce2353850e36f188ec7bad4eb2945581364b76 /meta/recipes-connectivity
parent5c35883efcf8ad61b2630b04638d1a7382525fd1 (diff)
downloadpoky-79f4495244ceddb197879ae24c33f469285bbff2.tar.gz
connman-conf: convert to systemd oneshot
Install a oneshot unit file that is started before ConnMan to configure a wired network inteface with the wired-setup script, rather than requiring this script to be manually run some how. (From OE-Core rev: 530c4525f278bff72d8184035d00020c10b8f8b4) Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity')
-rw-r--r--meta/recipes-connectivity/connman/connman-conf.bb12
-rw-r--r--meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service10
2 files changed, 21 insertions, 1 deletions
diff --git a/meta/recipes-connectivity/connman/connman-conf.bb b/meta/recipes-connectivity/connman/connman-conf.bb
index 9254ed7031..9a519ec866 100644
--- a/meta/recipes-connectivity/connman/connman-conf.bb
+++ b/meta/recipes-connectivity/connman/connman-conf.bb
@@ -4,8 +4,11 @@ network interface for a qemu machine."
4LICENSE = "GPLv2" 4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" 5LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
6 6
7inherit systemd
8
7SRC_URI_append_qemuall = " file://wired.config \ 9SRC_URI_append_qemuall = " file://wired.config \
8 file://wired-setup \ 10 file://wired-setup \
11 file://wired-connection.service \
9" 12"
10PR = "r2" 13PR = "r2"
11 14
@@ -17,10 +20,17 @@ FILES_${PN} = "${localstatedir}/* ${datadir}/*"
17 20
18do_install() { 21do_install() {
19 #Configure Wired network interface in case of qemu* machines 22 #Configure Wired network interface in case of qemu* machines
20 if test -e ${WORKDIR}/wired.config && test -e ${WORKDIR}/wired-setup; then 23 if test -e ${WORKDIR}/wired.config &&
24 test -e ${WORKDIR}/wired-setup &&
25 test -e ${WORKDIR}/wired-connection.service; then
21 install -d ${D}${localstatedir}/lib/connman 26 install -d ${D}${localstatedir}/lib/connman
22 install -m 0644 ${WORKDIR}/wired.config ${D}${localstatedir}/lib/connman 27 install -m 0644 ${WORKDIR}/wired.config ${D}${localstatedir}/lib/connman
23 install -d ${D}${datadir}/connman 28 install -d ${D}${datadir}/connman
24 install -m 0755 ${WORKDIR}/wired-setup ${D}${datadir}/connman 29 install -m 0755 ${WORKDIR}/wired-setup ${D}${datadir}/connman
30 install -d ${D}${systemd_system_unitdir}
31 install -m 0644 ${WORKDIR}/wired-connection.service ${D}${systemd_system_unitdir}
32 sed -i -e 's|@SCRIPTDIR@|${datadir}/connman|g' ${D}${systemd_system_unitdir}/wired-connection.service
25 fi 33 fi
26} 34}
35
36SYSTEMD_SERVICE_${PN}_qemuall = "wired-connection.service"
diff --git a/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service b/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service
new file mode 100644
index 0000000000..48adfc08ac
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service
@@ -0,0 +1,10 @@
1[Unit]
2Description=Setup a wired interface
3Before=connman.service
4
5[Service]
6Type=oneshot
7ExecStart=@SCRIPTDIR@/wired-setup
8
9[Install]
10WantedBy=network.target