Patchwork connman-conf: Initial systemd support

login
register
mail settings
Submitter Jukka Rissanen
Date March 18, 2013, 1:39 p.m.
Message ID <1363613958-20200-1-git-send-email-jukka.rissanen@linux.intel.com>
Download mbox | patch
Permalink /patch/46387/
State New
Headers show

Comments

Jukka Rissanen - March 18, 2013, 1:39 p.m.
Create IPv4 address for ethernet in qemu image when systemd is
in use.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
---
Hi,

this patch will provision the ethernet IP address automatically
in qemu image when systemd is being used.

Cheers,
Jukka

 .../connman/connman-conf.bbappend                     | 19 +++++++++++++++++++
 .../connman/connman-conf/qemuall/connman-conf.service | 11 +++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 meta-systemd/oe-core/recipes-connectivity/connman/connman-conf.bbappend
 create mode 100644 meta-systemd/oe-core/recipes-connectivity/connman/connman-conf/qemuall/connman-conf.service
Martin Jansa - March 18, 2013, 3:14 p.m.
On Mon, Mar 18, 2013 at 03:39:18PM +0200, Jukka Rissanen wrote:
> Create IPv4 address for ethernet in qemu image when systemd is
> in use.

This belongs to oe-devel ML with [meta-systemd] in subject.

> 
> Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
> ---
> Hi,
> 
> this patch will provision the ethernet IP address automatically
> in qemu image when systemd is being used.
> 
> Cheers,
> Jukka
> 
>  .../connman/connman-conf.bbappend                     | 19 +++++++++++++++++++
>  .../connman/connman-conf/qemuall/connman-conf.service | 11 +++++++++++
>  2 files changed, 30 insertions(+)
>  create mode 100644 meta-systemd/oe-core/recipes-connectivity/connman/connman-conf.bbappend
>  create mode 100644 meta-systemd/oe-core/recipes-connectivity/connman/connman-conf/qemuall/connman-conf.service
> 
> diff --git a/meta-systemd/oe-core/recipes-connectivity/connman/connman-conf.bbappend b/meta-systemd/oe-core/recipes-connectivity/connman/connman-conf.bbappend
> new file mode 100644
> index 0000000..6699355
> --- /dev/null
> +++ b/meta-systemd/oe-core/recipes-connectivity/connman/connman-conf.bbappend
> @@ -0,0 +1,19 @@
> +PRINC := "${@int(PRINC) + 1}"
> +
> +inherit systemd
> +
> +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
> +SRC_URI_append_qemuall += " file://connman-conf.service "
> +
> +SYSTEMD_PACKAGES = "${PN}-systemd"
> +SYSTEMD_SERVICE_${PN}-systemd = "connman-conf.service"
> +SYSTEMD_AUTO_ENABLE = "enable"
> +
> +FILES_${PN} += " connman-conf.service "
> +
> +do_install_append() {
> +	install -d ${D}${nonarch_base_libdir}/systemd/system
> +	install -m 0755 ${WORKDIR}/connman-conf.service ${D}${nonarch_base_libdir}/systemd/system
> +}
> +
> +PACKAGES += " ${PN}-systemd"
> diff --git a/meta-systemd/oe-core/recipes-connectivity/connman/connman-conf/qemuall/connman-conf.service b/meta-systemd/oe-core/recipes-connectivity/connman/connman-conf/qemuall/connman-conf.service
> new file mode 100644
> index 0000000..5d3c2b4
> --- /dev/null
> +++ b/meta-systemd/oe-core/recipes-connectivity/connman/connman-conf/qemuall/connman-conf.service
> @@ -0,0 +1,11 @@
> +[Unit]
> +Description=Setup IP address for wired interface
> +After=syslog.target
> +
> +[Service]
> +Type=simple
> +ExecStart=-/usr/lib/connman/wired-setup
> +StandardOutput=null
> +
> +[Install]
> +WantedBy=connman.service
> -- 
> 1.7.11.4
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Ross Burton - March 19, 2013, 10:30 a.m.
On 18 March 2013 13:39, Jukka Rissanen <jukka.rissanen@linux.intel.com> wrote:
> Create IPv4 address for ethernet in qemu image when systemd is
> in use.
>
> Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>

Please patch oe-core instead of appending in meta-systemd.

Ross

Patch

diff --git a/meta-systemd/oe-core/recipes-connectivity/connman/connman-conf.bbappend b/meta-systemd/oe-core/recipes-connectivity/connman/connman-conf.bbappend
new file mode 100644
index 0000000..6699355
--- /dev/null
+++ b/meta-systemd/oe-core/recipes-connectivity/connman/connman-conf.bbappend
@@ -0,0 +1,19 @@ 
+PRINC := "${@int(PRINC) + 1}"
+
+inherit systemd
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+SRC_URI_append_qemuall += " file://connman-conf.service "
+
+SYSTEMD_PACKAGES = "${PN}-systemd"
+SYSTEMD_SERVICE_${PN}-systemd = "connman-conf.service"
+SYSTEMD_AUTO_ENABLE = "enable"
+
+FILES_${PN} += " connman-conf.service "
+
+do_install_append() {
+	install -d ${D}${nonarch_base_libdir}/systemd/system
+	install -m 0755 ${WORKDIR}/connman-conf.service ${D}${nonarch_base_libdir}/systemd/system
+}
+
+PACKAGES += " ${PN}-systemd"
diff --git a/meta-systemd/oe-core/recipes-connectivity/connman/connman-conf/qemuall/connman-conf.service b/meta-systemd/oe-core/recipes-connectivity/connman/connman-conf/qemuall/connman-conf.service
new file mode 100644
index 0000000..5d3c2b4
--- /dev/null
+++ b/meta-systemd/oe-core/recipes-connectivity/connman/connman-conf/qemuall/connman-conf.service
@@ -0,0 +1,11 @@ 
+[Unit]
+Description=Setup IP address for wired interface
+After=syslog.target
+
+[Service]
+Type=simple
+ExecStart=-/usr/lib/connman/wired-setup
+StandardOutput=null
+
+[Install]
+WantedBy=connman.service