Browse Source

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.
neels/inmarsat
Holger Hans Peter Freyther 7 years ago
parent
commit
34d053fbe8
  1. 13
      recipes-config/sysmocom-openvpn-config/sysmocom-openvpn-config_1.bb

13
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/
}
Loading…
Cancel
Save