scsi-link-pm: Don't fail if there are no matching SCSI hosts

This commit is contained in:
Eelco Dolstra 2012-10-04 23:25:11 -04:00
parent 8f4d8cf620
commit 5d9b3ed12b

View File

@ -25,13 +25,14 @@ with pkgs.lib;
config = mkIf (config.powerManagement.scsiLinkPolicy != "") {
jobs."scsi-link-pm" =
{ description = "Set SCSI link power management policy";
{ description = "SCSI Link Power Management Policy";
startOn = "started udev";
startOn = "stopped udevtrigger";
task = true;
script = ''
shopt -s nullglob
for x in /sys/class/scsi_host/host*/link_power_management_policy; do
echo ${config.powerManagement.scsiLinkPolicy} > $x
done