TTYACTION(5) | File Formats Manual | TTYACTION(5) |
The first two fields are delimited with blanks or tabs, and the command field is all text to the end of the line. Either or both of first two fields may contain wildcard match patterns as implemented by the fnmatch() library function.
All command strings are executed by passing them to /bin/sh -c running as "root," with an environment containing:
TTY=ttyname ACT=action USER=username PATH=_PATH_STDPATH
These variables may be used directly in the shell command part of the record for simple tasks such as changing the ownership of related devices. For example:
console * chown ${USER}:tty /dev/mouse
will chown the mouse appropriately when the console owner changes.
tty0 login /somewhere/tty_setup ${TTY} tty0 getty /somewhere/tty_clean ${TTY} * * /somewhere/ttyfrob ${TTY} ${ACT}
August 24, 1996 | NetBSD 6.1 |