disks: modify power_limit

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-08-02 21:41:16 +02:00
parent 5eff20e129
commit ad211a0ace

View File

@ -283,7 +283,7 @@ function dtModel() {
echo " pcie_root = \"${PCIEPATH}\";" >>${DEST}
echo " port_type = \"ssdcache\";" >>${DEST}
echo " };" >>${DEST}
POWER_LIMIT="${POWER_LIMIT},0"
POWER_LIMIT="${POWER_LIMIT},100"
fi
done
[ -n "${POWER_LIMIT:1}" ] && sed -i "s/power_limit = .*/power_limit = \"${POWER_LIMIT:1}\";/" ${DEST} || sed -i '/power_limit/d' ${DEST}