Title is self explanatory, i want to run a command whenever my external Hard Disk gets mounted.
Since my hard disk can handle spinning down by it self, i dont want to use HD-Idle service, i prefer to use hdparm command and save some memory, cpu cycles and save space by uninstalling it. HD-Idle runs all the time in the background, so i want to use
hdparm -S 60 /dev/sda
whenever the HD is mounted. The problem is that the command is lost every time i turn disk off, so i need to execute it everytime i turn on/mount the device.
(My opinion: I can see the need to run scripts when USB is plugged for more elaborate purposes, but I am not entirely sure replacing hd-idle is worth the time and effort. hd-idle service takes up virtually no space, CPU, or memory -- it's an 8 kb binary tool and some config files.)