summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-phosphor/certificate/phosphor-nslcd-authority-cert-config.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-phosphor/recipes-phosphor/certificate/phosphor-nslcd-authority-cert-config.bb')
-rw-r--r--meta-phosphor/recipes-phosphor/certificate/phosphor-nslcd-authority-cert-config.bb23
1 files changed, 18 insertions, 5 deletions
diff --git a/meta-phosphor/recipes-phosphor/certificate/phosphor-nslcd-authority-cert-config.bb b/meta-phosphor/recipes-phosphor/certificate/phosphor-nslcd-authority-cert-config.bb
index 4e240ad38..d41de2b59 100644
--- a/meta-phosphor/recipes-phosphor/certificate/phosphor-nslcd-authority-cert-config.bb
+++ b/meta-phosphor/recipes-phosphor/certificate/phosphor-nslcd-authority-cert-config.bb
@@ -5,11 +5,24 @@ PR = "r1"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/LICENSE;md5=19407077e42b1ba3d653da313f1f5b4e"
-RRECOMMENDS_${PN} = "phosphor-certificate-manager"
+RDEPENDS_${PN} = "phosphor-certificate-manager"
inherit allarch
-inherit obmc-phosphor-systemd
-SYSTEMD_SERVICE_${PN} = ""
-SYSTEMD_ENVIRONMENT_FILE_${PN} = "obmc/cert/authority"
-SYSTEMD_LINK_${PN} = "../phosphor-certificate-manager@.service:${SYSTEMD_DEFAULT_TARGET}.wants/phosphor-certificate-manager@authority.service"
+SRC_URI = "file://env"
+
+do_install() {
+ install -D ${WORKDIR}/env ${D}/${sysconfdir}/default/obmc/cert/authority
+}
+
+pkg_postinst_${PN}() {
+ LINK="$D$systemd_system_unitdir/multi-user.target.wants/phosphor-certificate-manager@authority.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@authority.service"
+ rm $LINK
+}