summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/recipes-phosphor/certificate/phosphor-nslcd-cert-config.bb
blob: d344851fc0c6d8466ff3e7bbe7a6b45860c36dae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
SUMMARY = "Phosphor certificate manager configuration for a nslcd certificate"

PR = "r1"

LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/LICENSE;md5=19407077e42b1ba3d653da313f1f5b4e"

RDEPENDS_${PN} = "phosphor-certificate-manager"

inherit allarch

SRC_URI = "file://env"

do_install() {
	install -D ${WORKDIR}/env ${D}/${sysconfdir}/default/obmc/cert/nslcd
}

pkg_postinst_${PN}() {
	LINK="$D$systemd_system_unitdir/multi-user.target.wants/phosphor-certificate-manager@nslcd.service"
	TARGET="../phosphor-certificate-manager@.service"
	mkdir -p $D$systemd_system_unitdir/multi-user.target.wants
	ln -s $TARGET $LINK
}

pkg_prerm_${PN}() {
	LINK="$D$systemd_system_unitdir/multi-user.target.wants/phosphor-certificate-manager@nslcd.service"
	rm $LINK
}
OpenPOWER on IntegriCloud