UDEV Rule for Timeouts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have written a simple udev rule calling a bash script to set the timeouts on all connected devices.  I would like to a) provide this to anybody who feels they may need it and b) know if anybody sees any potential issues with this.  It seems to work fine for me over a couple reboots...

contents of udev rule:
ACTION=="add", SUBSYSTEM=="block", KERNEL=="[sh]d[a-z]", RUN+="/usr/local/bin/settimeout"

contents of /usr/local/bin/settimeout:
#!/bin/bash

[ "${ACTION}" == "add" ] && {
	/usr/sbin/smartctl -l scterc,70,70 ${DEVNAME} || echo 180 > /sys/${DEVPATH}/device/timeout
}

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux