Cluster demo support updates
[AGL/meta-agl-demo.git] / recipes-config / cluster-demo-network-config / cluster-demo-network-config_1.0.bb
1 SUMMARY     = "Setting files for cluster network for the AGL Demonstrator"
2 DESCRIPTION = "Setting files for cluster network for the AGL Demonstrator"
3 LICENSE     = "MIT"
4 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
5
6 inherit systemd allarch
7
8 SRC_URI = "file://cluster-demo-network-conf@.service \
9            file://cluster-demo-network-conf.sh \
10 "
11
12 # Network device for dedicated connection to cluster
13 AGL_CLUSTER_NET_DEVICE ?= "eth1"
14
15 do_configure[noexec] = "1"
16 do_compile[noexec] = "1"
17
18 do_install() {
19     # Install helper script
20     install -d ${D}${sbindir}
21     install -m 0755 ${WORKDIR}/cluster-demo-network-conf.sh ${D}${sbindir}/
22
23     # Install service unit
24     install -d ${D}${systemd_system_unitdir}
25     install -m 0644 ${WORKDIR}/cluster-demo-network-conf@.service ${D}${systemd_system_unitdir}/
26
27     # Add symlink to network.target.wants
28     install -d ${D}${sysconfdir}/systemd/system/network.target.wants
29     ln -s ${systemd_system_unitdir}/cluster-demo-network-conf@.service \
30         ${D}${sysconfdir}/systemd/system/network.target.wants/cluster-demo-network-conf@${AGL_CLUSTER_NET_DEVICE}.service
31 }
32
33 FILES_${PN} += "${systemd_system_unitdir}"