diff options
author | Mark Asselstine <mark.asselstine@windriver.com> | 2015-12-11 12:28:25 -0500 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2015-12-15 08:47:25 -0500 |
commit | f7dcf5bce94064d32e6d07f9385fbff02e2a86f2 (patch) | |
tree | 2883736999f3b725b62a94f54433f2ce655e79bb /recipes-networking | |
parent | 5181ec2259eba5f4d3ec8516ea693bbc94481cf3 (diff) | |
download | meta-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.inc | 16 |
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" | |||
61 | FILES_${PN}-switch = "\ | 61 | FILES_${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 |
67 | FILES_${PN} += "${datadir}/ovsdbmonitor" | 69 | FILES_${PN} += "${datadir}/ovsdbmonitor" |
68 | FILES_${PN} += "/run" | 70 | FILES_${PN} += "/run" |
69 | 71 | ||
70 | inherit autotools update-rc.d | 72 | inherit autotools update-rc.d systemd |
73 | |||
74 | SYSTEMD_PACKAGES = "${PN}-switch" | ||
75 | SYSTEMD_SERVICE_${PN}-switch = " \ | ||
76 | openvswitch-nonetwork.service \ | ||
77 | openvswitch-switch.service \ | ||
78 | " | ||
71 | 79 | ||
72 | INITSCRIPT_PACKAGES = "${PN}-switch ${PN}-testcontroller" | 80 | INITSCRIPT_PACKAGES = "${PN}-switch ${PN}-testcontroller" |
73 | INITSCRIPT_NAME_${PN}-switch = "openvswitch-switch" | 81 | INITSCRIPT_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 | } |