From 34d053fbe833c23c6cf1b98ff410050e10ed2b3b Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 14 Feb 2015 10:12:30 +0100 Subject: [PATCH] sysmocom-openvpn-config: Always start but rename the config file For the sysmoBTS (and other devices) we always enable the service but move the config file to a name that will be ignored by the systemd generator. --- .../sysmocom-openvpn-config_1.bb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/recipes-config/sysmocom-openvpn-config/sysmocom-openvpn-config_1.bb b/recipes-config/sysmocom-openvpn-config/sysmocom-openvpn-config_1.bb index e1518e6..46b5aed 100644 --- a/recipes-config/sysmocom-openvpn-config/sysmocom-openvpn-config_1.bb +++ b/recipes-config/sysmocom-openvpn-config/sysmocom-openvpn-config_1.bb @@ -7,10 +7,19 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384 SRC_URI = "file://sysmocom-vpn.conf" PR = "r4" -CONFFILES_${PN} = "${sysconfdir}/openvpn/sysmocom-vpn.conf" +CONFFILES_${PN} = "${sysconfdir}/openvpn/sysmocom-vpn.conf.off" PACKAGE_ARCH = "all" do_install() { install -d ${D}${sysconfdir}/openvpn - install -m 0644 ${WORKDIR}/sysmocom-vpn.conf ${D}${sysconfdir}/openvpn + install -m 0644 ${WORKDIR}/sysmocom-vpn.conf ${D}${sysconfdir}/openvpn/sysmocom-vpn.conf.off +} + +# Always enable the OpenVPN service. This assumes that +# this package will never be inside the nornal sysmocom +# feed. +FILES_${PN} += "${systemd_unitdir}" +do_install_append() { + install -d ${D}${systemd_unitdir}/system/multi-user.target.wants/ + ln -sf ../openvpn.service ${D}${systemd_unitdir}/system/multi-user.target.wants/ }