Patchwork [meta-oe,v2,2/3] networkmanager: inherit systemd

login
register
mail settings
Submitter Andreas Müller
Date March 6, 2012, 12:58 a.m.
Message ID <1330995497-10440-3-git-send-email-schnitzeltony@googlemail.com>
Download mbox | patch
Permalink /patch/22725/
State New, archived
Headers show

Comments

Andreas Müller - March 6, 2012, 12:58 a.m.
networkmanager-systemd was not yet created to avoid fallout in images. The
warning for this created at parse time is our reminder.

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 .../networkmanager/networkmanager_0.9.2.0.bb       |   30 ++++----------------
 1 files changed, 6 insertions(+), 24 deletions(-)

Patch

diff --git a/meta-oe/recipes-connectivity/networkmanager/networkmanager_0.9.2.0.bb b/meta-oe/recipes-connectivity/networkmanager/networkmanager_0.9.2.0.bb
index 45f98be..6bbbce5 100644
--- a/meta-oe/recipes-connectivity/networkmanager/networkmanager_0.9.2.0.bb
+++ b/meta-oe/recipes-connectivity/networkmanager/networkmanager_0.9.2.0.bb
@@ -4,10 +4,10 @@  SECTION = "net/misc"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=cbbffd568227ada506640fe950a4823b"
 
-PR = "r4"
+PR = "r5"
 
 DEPENDS = "systemd libnl dbus dbus-glib udev wireless-tools polkit gnutls util-linux ppp"
-inherit gnome gettext
+inherit gnome gettext systemd
 
 SRC_URI = "${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.bz2 \
     file://0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch \
@@ -56,14 +56,15 @@  do_install_append () {
 	install -d ${D}/etc/NetworkManager/VPN
 }
 
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE = "NetworkManager.service"
+
 PACKAGES =+ "libnmutil libnmglib libnmglib-vpn ${PN}-tests" 
 
 FILES_libnmutil += "${libdir}/libnm-util.so.*"
 FILES_libnmglib += "${libdir}/libnm_glib.so.*"
 FILES_libnmglib-vpn += "${libdir}/libnm_glib_vpn.so.*"
 
-systemd_unitdir = "${base_libdir}/systemd/system"
-
 FILES_${PN} += " \
 		${libexecdir} \
 		${libdir}/pppd/*/nm-pppd-plugin.so \
@@ -71,7 +72,7 @@  FILES_${PN} += " \
 		${datadir}/polkit-1 \
 		${datadir}/dbus-1 \
 		${base_libdir}/udev/* \
-        ${systemd_unitdir} \
+                ${systemd_unitdir}/system/NetworkManager-wait-online.service \
 "
 
 RRECOMMENDS_${PN} += "iptables"
@@ -95,22 +96,3 @@  FILES_${PN}-tests = "${bindir}/nm-tool \
                      ${bindir}/nm-online \
                      ${bindir}/nm-supplicant \
                      ${bindir}/nm-testdevices"
-
-
-pkg_postinst_${PN}() {
-    # can't do this offline
-    if [ "x$D" != "x" ]; then
-        exit 1
-    fi
-    
-    systemctl enable NetworkManager.service
-}
-
-pkg_prerm_${PN}() {
-    # can't do this offline
-    if [ "x$D" != "x" ]; then
-        exit 1
-    fi
-
-    systemctl disable NetworkManager.service
-}