I'm not sure if my title is describing it correctly, but essentially, I was wondering if there was a way to register a callback with the system so that when a user attached an external drive my callback is called and I can then proceed to manually mount the disk.What I'm doing currently is putting a default entry into /etc/fstab with nofail on, this way if the drive is inserted before boot it will be automatically mounted. What'd I'd rather do though is allow the drive to be inserted at anytime, and have it automounted by the system. Is there a way to do this without polling lsblk in a loop?
Register callback for newly inserted disk?
mount;ext4;automounting