I have a remote serial device attached to
/dev/ttyAMA0 that requires a serial command to be issued before a program connects so that the program will read the return string and automatically recognize it. I can not change the behavior of the main program.
Is there any way to run a script when a userland program accesses a
/dev/tty character device?
udev rule only runs during boot and not, say when I connect with minicom.
I was researching a way to make a fake character device that would do this but it was looking like I would need to write a device driver.