The udev
rules I've created so far only deal with devices being added or removed, i.e.:
ACTION=="add"...
or ACTION=="remove"...
I've come across an example of a rule that seems to deal with device state changes as well:
ACTION=="add|change", KERNEL=="sd[b-z]", ATTR{queue/rotational}=="1", RUN+="/usr/bin/hdparm -B 127 -S 12 /dev/%k"
I take it that the above rule applies whenever a matching device is added OR its state changes.
Question: What kind of state changes are possible (generally and specific to a USB hard drive)?
I've checked all udev documentation I can find and there's barely any mention of, or usage guidance, in respect of device state changes or specifically ACTION="change"
.