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