I want to put a block of code in my ~/.profile to run only when I have logged in via the serial console. I never want it to run when I log in via telnet/ssh/whatever.
My system has "::askconsole:/bin/login" set in /etc/inittab, so console access is authenticated, but I don't think this should really matter.
I immediately thought about using the "tty" command to print the tty I'm logged in on, but I have multiple device types I would like to use this on, and they don't all use the same dev name for the tty.
on second thought, the tty command isn't even in the default build config, so that's probably not going to work for me. May have to go with SSH_ env after all, unless I can find something better.