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.
This commit is contained in:
Holger Hans Peter Freyther 2015-02-14 10:12:30 +01:00
parent 3235c311c9
commit 34d053fbe8
1 changed files with 11 additions and 2 deletions

View File

@ -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/
}