From f7dcf5bce94064d32e6d07f9385fbff02e2a86f2 Mon Sep 17 00:00:00 2001 From: Mark Asselstine Date: Fri, 11 Dec 2015 12:28:25 -0500 Subject: openvswitch: enable systemd support Make the necessary updates to get openvswitch to be compatible with systemd. Up to now if you built a systemd supported image openvswitch was using the systemd sysvinit wrappers, by making these changes we now support systemd natively. Note that there is no equivalent systemd support for openvswitch-testcontroller. Following the lead of upstream this is not something that should be run by the init system. Signed-off-by: Mark Asselstine Signed-off-by: Bruce Ashfield --- recipes-networking/openvswitch/openvswitch.inc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'recipes-networking/openvswitch/openvswitch.inc') diff --git a/recipes-networking/openvswitch/openvswitch.inc b/recipes-networking/openvswitch/openvswitch.inc index 13c7d062..fc515e90 100644 --- a/recipes-networking/openvswitch/openvswitch.inc +++ b/recipes-networking/openvswitch/openvswitch.inc @@ -61,13 +61,21 @@ FILES_${PN}-brcompat = "${sbindir}/ovs-brcompatd" FILES_${PN}-switch = "\ ${sysconfdir}/init.d/openvswitch-switch \ ${sysconfdir}/default/openvswitch-switch \ + ${systemd_unitdir}/system/openvswitch.service \ + ${systemd_unitdir}/system/openvswitch-nonetwork.service \ " # silence a warning FILES_${PN} += "${datadir}/ovsdbmonitor" FILES_${PN} += "/run" -inherit autotools update-rc.d +inherit autotools update-rc.d systemd + +SYSTEMD_PACKAGES = "${PN}-switch" +SYSTEMD_SERVICE_${PN}-switch = " \ + openvswitch-nonetwork.service \ + openvswitch-switch.service \ +" INITSCRIPT_PACKAGES = "${PN}-switch ${PN}-testcontroller" INITSCRIPT_NAME_${PN}-switch = "openvswitch-switch" @@ -87,7 +95,11 @@ do_install_append() { install -m 755 ${WORKDIR}/openvswitch-switch ${D}/${sysconfdir}/init.d/openvswitch-switch true || rm -fr ${D}/${datadir}/${PN}/pki - install -d ${D}/${sysconfdir}/init.d/ + install -d ${D}/${systemd_unitdir}/system/ + install -m 644 ${S}/rhel/usr_lib_systemd_system_openvswitch.service \ + ${D}/${systemd_unitdir}/system/openvswitch-switch.service + install -m 644 ${S}/rhel/usr_lib_systemd_system_openvswitch-nonetwork.service \ + ${D}/${systemd_unitdir}/system/openvswitch-nonetwork.service oe_runmake modules_install INSTALL_MOD_PATH=${D} } -- cgit v1.2.3-54-g00ecf