blob: a758c917a8e5ffcb06b442827ff0f2c7b2e58f23 [file] [log] [blame]
Matt Spinler8cca7012016-12-05 10:42:47 -06001SUMMARY = "Set Witherspoon fan default speeds"
2DESCRIPTION = "Sets all fans to a single speed"
3PR = "r1"
4
5inherit allarch
6inherit obmc-phosphor-license
7inherit obmc-phosphor-systemd
8
9RDEPENDS_${PN} += "i2c-tools"
10
11S = "${WORKDIR}"
12SRC_URI += "file://set_fan_speeds.sh"
13
14TMPL = "fan-default-speed@.service"
15INSTFMT = "fan-default-speed@{0}.service"
16TGTFMT = "obmc-chassis-start@{0}.target"
17FMT = "../${TMPL}:${TGTFMT}.wants/${INSTFMT}"
18
19SYSTEMD_SERVICE_${PN} += "${TMPL}"
20SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}"
21
22do_install() {
23 install -d ${D}${bindir}
24 install -m 0755 ${WORKDIR}/set_fan_speeds.sh ${D}${bindir}/set_fan_speeds.sh
25}