ttyaction man page on NetBSD

Man page or keyword search:  
man Server   9087 pages
apropos Keyword Search (all sections)
Output format
NetBSD logo
[printable version]

TTYACTION(5)		    BSD File Formats Manual		  TTYACTION(5)

NAME
     ttyactionttyaction file format

DESCRIPTION
     The ttyaction file specifies site-specific commands to run when a login
     session begins and ends. The ttyaction file contains a list of newline
     separated records, where each record has the following three fields:

     ttyname   Name of the tty line(s) on which this line should apply.	 The
	       name is relative to the /dev directory, similar to how such
	       devices are named in the /etc/ttys file.

     action    Name of the action for which this line should apply.  The
	       action names currently defined are "login", "getty", "telnetd"
	       and "rlogind" which indicate which program is processing this
	       file.  (Note that "login" begins a login session, while the
	       other three are run after a login session ends.)

     command   What command to run if this record matches.

     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.

EXAMPLES
     Here are some more example records:

	   tty0	   login   /somewhere/tty_setup ${TTY}
	   tty0	   getty   /somewhere/tty_clean ${TTY}
	   *	   *	   /somewhere/ttyfrob ${TTY} ${ACT}

SEE ALSO
     fnmatch(3), ttyaction(3)

HISTORY
     The ideas for the /etc/ttyaction file were inspired by the /etc/fbtab
     file under SunOS.

BSD				August 24, 1996				   BSD
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server NetBSD

List of man pages available for NetBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net