blob: 80143bf2d01e4b356b68e82ea6be73810b300e11 [file] [log] [blame]
Brad Bishopfeb19ef2019-11-07 18:02:16 -05001unit_files = [
2 ['adc', 'xyz.openbmc_project.adcsensor.service'],
Thu Nguyen255da6b2022-07-29 10:05:52 +07003 ['intel-cpu', 'xyz.openbmc_project.intelcpusensor.service'],
Brad Bishopfeb19ef2019-11-07 18:02:16 -05004 ['exit-air', 'xyz.openbmc_project.exitairsensor.service'],
5 ['fan', 'xyz.openbmc_project.fansensor.service'],
6 ['hwmon-temp', 'xyz.openbmc_project.hwmontempsensor.service'],
7 ['ipmb', 'xyz.openbmc_project.ipmbsensor.service'],
8 ['intrusion', 'xyz.openbmc_project.intrusionsensor.service'],
Ed Tanous49d12d82021-02-11 13:44:15 -08009 ['mcu', 'xyz.openbmc_project.mcutempsensor.service'],
Brad Bishopfeb19ef2019-11-07 18:02:16 -050010 ['nvme', 'xyz.openbmc_project.nvmesensor.service'],
Lei YU3a18b862021-02-05 13:55:08 +080011 ['psu', 'xyz.openbmc_project.psusensor.service'],
Jeff Lina62c0692021-02-18 16:22:14 +080012 ['external', 'xyz.openbmc_project.externalsensor.service'],
Brad Bishopfeb19ef2019-11-07 18:02:16 -050013]
14
Andrew Jeffery8eb514a2024-01-04 10:30:10 +103015fs = import('fs')
Brad Bishopfeb19ef2019-11-07 18:02:16 -050016foreach tuple : unit_files
Patrick Williams5bc307f2023-11-29 06:44:23 -060017 if get_option(tuple[0]).allowed()
Andrew Jeffery8eb514a2024-01-04 10:30:10 +103018 fs.copyfile(
19 tuple[1],
Brad Bishopfeb19ef2019-11-07 18:02:16 -050020 install: true,
21 install_dir: systemd_system_unit_dir,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050022 )
23 endif
Brad Bishopfeb19ef2019-11-07 18:02:16 -050024endforeach