3 require fault-common.inc
4 SUBPATH0 = "fm-rest-api/fm"
6 LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
10 install -d -m 755 ${D}/${systemd_system_unitdir}
11 install -p -D -m 644 scripts/fm-api.service ${D}/${systemd_system_unitdir}
12 install -p -D -m 755 scripts/fm-api ${D}/${sysconfdir}/init.d/fm-api
13 install -p -D -m 644 fm-api-pmond.conf ${D}/${sysconfdir}/pmon.d/fm-api.conf
15 # fix the path for init scripts
16 sed -i -e 's|rc.d/||' ${D}/${systemd_system_unitdir}/*.service
20 SYSTEMD_PACKAGES += "fm-rest-api"
21 SYSTEMD_SERVICE_${PN} = "fm-api.service"
22 SYSTEMD_AUTO_ENABLE_${PN} = "disable"
23 DISTRO_FEATURES_BACKFILL_CONSIDERED_remove = "sysvinit"
27 RDEPENDS_${PN} += " python-oslo.config"
29 pkg_postinst_ontarget_${PN}() {
31 cat > /etc/fm/config-generator.conf << EOF
33 output_file = fm.conf.sample
35 namespace = fm.api.conf
36 namespace = keystonemiddleware.auth_token
37 namespace = oslo.middleware
39 namespace = oslo.policy
43 oslo-config-generator --config-file /etc/fm/config-generator.conf --output-file /etc/fm/fm.conf.sample
44 mv /etc/fm/fm.conf.sample /etc/fm/fm.conf
45 rm /etc/fm/config-generator.conf