1feb19ef0SBrad Bishopunit_files = [
2feb19ef0SBrad Bishop    ['adc', 'xyz.openbmc_project.adcsensor.service'],
3feb19ef0SBrad Bishop    ['cpu', 'xyz.openbmc_project.cpusensor.service'],
4feb19ef0SBrad Bishop    ['exit-air', 'xyz.openbmc_project.exitairsensor.service'],
5feb19ef0SBrad Bishop    ['fan', 'xyz.openbmc_project.fansensor.service'],
6feb19ef0SBrad Bishop    ['hwmon-temp', 'xyz.openbmc_project.hwmontempsensor.service'],
7feb19ef0SBrad Bishop    ['ipmb', 'xyz.openbmc_project.ipmbsensor.service'],
8feb19ef0SBrad Bishop    ['intrusion', 'xyz.openbmc_project.intrusionsensor.service'],
9feb19ef0SBrad Bishop    ['mcu-temp', 'xyz.openbmc_project.mcutempsensor.service'],
10feb19ef0SBrad Bishop    ['nvme', 'xyz.openbmc_project.nvmesensor.service'],
11*3a18b860SLei YU    ['psu', 'xyz.openbmc_project.psusensor.service'],
12feb19ef0SBrad Bishop]
13feb19ef0SBrad Bishop
14feb19ef0SBrad Bishopforeach tuple : unit_files
15feb19ef0SBrad Bishop    if get_option(tuple[0]).enabled()
16feb19ef0SBrad Bishop        configure_file(
17feb19ef0SBrad Bishop            copy: true,
18feb19ef0SBrad Bishop            input: tuple[1],
19feb19ef0SBrad Bishop            install: true,
20feb19ef0SBrad Bishop            install_dir: systemd_system_unit_dir,
21feb19ef0SBrad Bishop            output: tuple[1],
22feb19ef0SBrad Bishop        )
23feb19ef0SBrad Bishop    endif
24feb19ef0SBrad Bishopendforeach
25