[pddf]: Adding pre_pddf_init script in the service file (#7834)

Why I did it
Some platforms need to run few steps before the PDDF service is actually started.

* Adding pre_pddf_init script in the service file
* Raising exception for get_target_speed() for PSU-fan in PDDF (#8129)
This commit is contained in:
FuzailBrcm 2022-01-03 11:58:48 +05:30 committed by GitHub
parent fa361f164c
commit 6ed0c434b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ DefaultDependencies=no
[Service]
Type=oneshot
ExecStartPre=-/usr/local/bin/pre_pddf_init.sh
ExecStart=/usr/local/bin/pddf_util.py install
ExecStop=/usr/local/bin/pddf_util.py clean
RemainAfterExit=yes

View File

@ -224,7 +224,7 @@ class PddfFan(FanBase):
target_speed = 0
if self.is_psu_fan:
# Target speed not usually supported for PSU fans
target_speed = 0
raise NotImplementedError
else:
idx = (self.fantray_index-1)*self.platform['num_fans_pertray'] + self.fan_index
attr = "fan" + str(idx) + "_pwm"