
NAME
on -- turn on Unix terminals as specified in /etc/onttys
on? -- turn on all specified Unix terminals with character ?
off -- turn off all Unix terminals

SYNOPSIS
on [all] [terminal characters]
on? [all] [terminal characters]
off [all] [terminal characters]

DESCRIPTION
There is actually only one program which has eleven links to  it.
The names of the links are:

on on1 on2 on3 on4 on5 on6 on7 on8 on9 off

The action taken by the program depends upon what name is used to
execute it.


The arguments to the program (called by  any  name)  may  include
terminal  characters  (such as 0, %, !, etc.) and/or the argument
"all".  The individual characters specify individual terminals to
be affected by the on/off command.  The argument "all" has a spe-
cial meaning, discussed below.


The commands "on?" specify that the terminals given as  arguments
be  turned "on" in the tty file /etc/ttys, and that the character
? be the program specification.  For example, the command:
# on5 w
specifies that ttyw is to run program 5 instead  of  the  default
program  (1  =  login).   Note  that if the terminal is currently
"on", the current program will be allowed to finish, after  which
"init" will bring up the new program.


The "off" command causes the specified  terminals  to  be  turned
off,  that is, "init" will kill off whatever is running there and
will not bring up any new processes until they  are  turned  back
on.


The argument "all" is special, and has a slightly  different  in-
terpretation depending upon the desired function:

"off all" turns off all terminals in /etc/ttys.

"on all" causes the file /etc/onttys to be  consulted.   Terminal
characters  which appear in the first line will be turned on with
a "1", those in the second line will be turned  on  with  a  "2",
etc.   Terminal  characters not appearing in /etc/onttys will not
be affected.

"on# all", where # is a numeric character from 1 to 9, will cause
all  terminals whose characters appear in /etc/onttys, regardless
of what line they are in, to be turned on with mode #.


NOTE
"tty8" is an exception to the rule -- none of these commands will
modify it, whether it is called explicitly ("off 8") or implicit-
ly ("off all").

DIAGNOSTICS
"Can't open /etc/ttys"
"Can't open /etc/onttys"

The above files are missing and/or the caller does not have write
permission on them (not super-user).

FILES
/etc/ttys -- terminal file used by "init"
/etc/onttys -- specifications for "on"

SEE ALSO
runtty (VIII), getty(VIII), init(VIII)

BUGS
When executing this program with a shell command, type  only  the
program  name  ("on", "on1", "off", etc.), NOT the full pathname,
since the program examines its first argument (the  same  as  the
name you give to the shell) to determine what to do.

AUTHOR
J. A. Lowry
Modified by G. Goble and J. Bruner,  Purdue  University,  to  add
/etc/onttys file.  Modified by J. Bruner to support multiple pro-
gram types "on1", "on2", etc.
