Patchwork [v2] avahi: enable service when using systemd

login
register
mail settings
Submitter Koen Kooi
Date June 1, 2011, 2:27 p.m.
Message ID <1306938451-29445-1-git-send-email-koen@dominion.thruhere.net>
Download mbox | patch
Permalink /patch/5241/
State New, archived
Headers show

Comments

Koen Kooi - June 1, 2011, 2:27 p.m.
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 meta/recipes-connectivity/avahi/avahi.inc       |   18 ++++++++++++++++++
 meta/recipes-connectivity/avahi/avahi_0.6.30.bb |    2 +-
 2 files changed, 19 insertions(+), 1 deletions(-)
Saul Wold - June 3, 2011, 12:14 a.m.
On 06/01/2011 07:27 AM, Koen Kooi wrote:
> Signed-off-by: Koen Kooi<koen@dominion.thruhere.net>
> ---
>   meta/recipes-connectivity/avahi/avahi.inc       |   18 ++++++++++++++++++
>   meta/recipes-connectivity/avahi/avahi_0.6.30.bb |    2 +-
>   2 files changed, 19 insertions(+), 1 deletions(-)
>
> diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc
> index 099c5a4..9e26a20 100644
> --- a/meta/recipes-connectivity/avahi/avahi.inc
> +++ b/meta/recipes-connectivity/avahi/avahi.inc
> @@ -46,6 +46,24 @@ PACKAGES =+ "avahi-systemd avahi-daemon libavahi-common libavahi-core libavahi-c
>   FILES_avahi-systemd = "${base_libdir}/systemd"
>   RDEPENDS_avahi-systemd = "avahi-daemon"
>
> +pkg_postinst_avahi-systemd() {
> +	# can't do this offline
> +	if [ "x$D" != "x" ]; then
> +		exit 1
> +	fi
> +	
> +	systemctl enable avahi-daemon.service
> +}
> +
> +pkg_postrm_avahi-systemd() {
> +	# can't do this offline
> +	if [ "x$D" != "x" ]; then
> +		exit 1
> +	fi
> +
> +	systemctl disable avahi-daemon.service
> +}
> +
>   FILES_libavahi-common = "${libdir}/libavahi-common.so.*"
>   FILES_libavahi-core = "${libdir}/libavahi-core.so.*"
>   FILES_libavahi-ui = "${libdir}/libavahi-ui.so.*"
> diff --git a/meta/recipes-connectivity/avahi/avahi_0.6.30.bb b/meta/recipes-connectivity/avahi/avahi_0.6.30.bb
> index e63f406..23c0fa0 100644
> --- a/meta/recipes-connectivity/avahi/avahi_0.6.30.bb
> +++ b/meta/recipes-connectivity/avahi/avahi_0.6.30.bb
> @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
>                       file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
>
>   RDEPENDS_avahi-daemon = "sysvinit-pidof"
> -PR = "r1"
> +PR = "r3"
>
>   EXTRA_OECONF += "--disable-gtk3"
>

Really merged this version, not the first one!

Sorry for the confusion.

Sau!

Patch

diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc
index 099c5a4..9e26a20 100644
--- a/meta/recipes-connectivity/avahi/avahi.inc
+++ b/meta/recipes-connectivity/avahi/avahi.inc
@@ -46,6 +46,24 @@  PACKAGES =+ "avahi-systemd avahi-daemon libavahi-common libavahi-core libavahi-c
 FILES_avahi-systemd = "${base_libdir}/systemd"
 RDEPENDS_avahi-systemd = "avahi-daemon"
 
+pkg_postinst_avahi-systemd() {
+	# can't do this offline
+	if [ "x$D" != "x" ]; then
+		exit 1
+	fi
+	
+	systemctl enable avahi-daemon.service
+}
+
+pkg_postrm_avahi-systemd() {
+	# can't do this offline
+	if [ "x$D" != "x" ]; then
+		exit 1
+	fi
+
+	systemctl disable avahi-daemon.service
+}
+
 FILES_libavahi-common = "${libdir}/libavahi-common.so.*"
 FILES_libavahi-core = "${libdir}/libavahi-core.so.*"
 FILES_libavahi-ui = "${libdir}/libavahi-ui.so.*"
diff --git a/meta/recipes-connectivity/avahi/avahi_0.6.30.bb b/meta/recipes-connectivity/avahi/avahi_0.6.30.bb
index e63f406..23c0fa0 100644
--- a/meta/recipes-connectivity/avahi/avahi_0.6.30.bb
+++ b/meta/recipes-connectivity/avahi/avahi_0.6.30.bb
@@ -7,7 +7,7 @@  LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
                     file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
 
 RDEPENDS_avahi-daemon = "sysvinit-pidof"
-PR = "r1"
+PR = "r3"
 
 EXTRA_OECONF += "--disable-gtk3"