openvpn: bring back openvpn.service file

Restore the openvpn.service file from packaging of openvpn 2.3.6, so we
can still start it the same way (as currently described in manuals).

Related: SYS#6303
Change-Id: I2cf96bc1ecca79ae98be1181fbd3c15edad15ca8
This commit is contained in:
Oliver Smith 2023-02-28 17:07:09 +01:00
parent 89f6d2b1f0
commit d69834d507
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# This service is actually a systemd target,
# but we are using a service since targets cannot be reloaded.
[Unit]
Description=OpenVPN service
After=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/true
ExecReload=/bin/true
WorkingDirectory=/etc/openvpn
[Install]
WantedBy=multi-user.target

View File

@ -7,9 +7,12 @@ DEPENDS = "lzo openssl iproute2 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '
inherit autotools systemd update-rc.d pkgconfig
PR = "r1"
SRC_URI = "http://swupdate.openvpn.org/community/releases/${BP}.tar.gz \
file://0001-configure.ac-eliminate-build-path-from-openvpn-versi.patch \
file://openvpn \
file://openvpn.service \
"
UPSTREAM_CHECK_URI = "https://openvpn.net/community-downloads"
@ -62,6 +65,9 @@ do_install_append() {
install -m 644 ${S}/sample/sample-scripts/* ${D}${sysconfdir}/openvpn/sample/sample-scripts
install -d -m 710 ${D}/${localstatedir}/lib/openvpn
# Keep openvpn.service to match manuals (SYS#6303)
install -m 0644 ${WORKDIR}/openvpn.service ${D}${systemd_system_unitdir}
}
PACKAGES =+ " ${PN}-sample "
@ -71,6 +77,7 @@ RRECOMMENDS_${PN} = "kernel-module-tun"
FILES_${PN}-dbg += "${libdir}/openvpn/plugins/.debug"
FILES_${PN} += "${systemd_system_unitdir}/openvpn-server@.service \
${systemd_system_unitdir}/openvpn-client@.service \
${systemd_system_unitdir}/openvpn.service \
${nonarch_libdir}/tmpfiles.d \
"
FILES_${PN}-sample = "${sysconfdir}/openvpn/sample/ \