I would like to execute some script automatically when removable media (e.g. USB flash memory) mounted. It likes autoexec.bat on Microsoft Windows.
How can I realize it?
In existing question (and answer), How to run a script when a specific flash-drive is mounted?, It's solution is edit rules.d on local storage.
However, I don't want to edit it. Because my purpose is build installer or log data capture for a lot of target.
On Windows, when removable media (autoexec.bat included) mounted, autoexec.bat start quickly without any settings for system. I would like to do the same things it.