summaryrefslogtreecommitdiffstats
path: root/recipes-networking
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2015-12-11 12:28:25 -0500
committerBruce Ashfield <bruce.ashfield@windriver.com>2015-12-15 08:47:25 -0500
commitf7dcf5bce94064d32e6d07f9385fbff02e2a86f2 (patch)
tree2883736999f3b725b62a94f54433f2ce655e79bb /recipes-networking
parent5181ec2259eba5f4d3ec8516ea693bbc94481cf3 (diff)
downloadmeta-virtualization-f7dcf5bce94064d32e6d07f9385fbff02e2a86f2.tar.gz
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 <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-networking')
-rw-r--r--recipes-networking/openvswitch/openvswitch.inc16
1 files changed, 14 insertions, 2 deletions
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"
61FILES_${PN}-switch = "\ 61FILES_${PN}-switch = "\
62 ${sysconfdir}/init.d/openvswitch-switch \ 62 ${sysconfdir}/init.d/openvswitch-switch \
63 ${sysconfdir}/default/openvswitch-switch \ 63 ${sysconfdir}/default/openvswitch-switch \
64 ${systemd_unitdir}/system/openvswitch.service \
65 ${systemd_unitdir}/system/openvswitch-nonetwork.service \
64 " 66 "
65 67
66# silence a warning 68# silence a warning
67FILES_${PN} += "${datadir}/ovsdbmonitor" 69FILES_${PN} += "${datadir}/ovsdbmonitor"
68FILES_${PN} += "/run" 70FILES_${PN} += "/run"
69 71
70inherit autotools update-rc.d 72inherit autotools update-rc.d systemd
73
74SYSTEMD_PACKAGES = "${PN}-switch"
75SYSTEMD_SERVICE_${PN}-switch = " \
76 openvswitch-nonetwork.service \
77 openvswitch-switch.service \
78"
71 79
72INITSCRIPT_PACKAGES = "${PN}-switch ${PN}-testcontroller" 80INITSCRIPT_PACKAGES = "${PN}-switch ${PN}-testcontroller"
73INITSCRIPT_NAME_${PN}-switch = "openvswitch-switch" 81INITSCRIPT_NAME_${PN}-switch = "openvswitch-switch"
@@ -87,7 +95,11 @@ do_install_append() {
87 install -m 755 ${WORKDIR}/openvswitch-switch ${D}/${sysconfdir}/init.d/openvswitch-switch 95 install -m 755 ${WORKDIR}/openvswitch-switch ${D}/${sysconfdir}/init.d/openvswitch-switch
88 true || rm -fr ${D}/${datadir}/${PN}/pki 96 true || rm -fr ${D}/${datadir}/${PN}/pki
89 97
90 install -d ${D}/${sysconfdir}/init.d/ 98 install -d ${D}/${systemd_unitdir}/system/
99 install -m 644 ${S}/rhel/usr_lib_systemd_system_openvswitch.service \
100 ${D}/${systemd_unitdir}/system/openvswitch-switch.service
101 install -m 644 ${S}/rhel/usr_lib_systemd_system_openvswitch-nonetwork.service \
102 ${D}/${systemd_unitdir}/system/openvswitch-nonetwork.service
91 103
92 oe_runmake modules_install INSTALL_MOD_PATH=${D} 104 oe_runmake modules_install INSTALL_MOD_PATH=${D}
93} 105}