[net.unix] Multiple links to tty's

perl@rdin.UUCP (Robert Perlberg) (08/01/86)

You can have multiple links to a login line as long as you make sure
that the one that is passed as an argument to getty(8) is the first
link in the directory.  The following procedure will assure this:

Create a temporary link to the device.

Remove all links except the temporary link.

Create the link that will be used with getty.

Create all other links.

Remove the temporary link.

The following example illustrates:

ln /dev/tty15 /dev/temp$$
rm /dev/tty15 /dev/ttyd3
ln /dev/temp$$ /dev/ttyd3
ln /dev/ttyd3 /dev/tty15
rm /dev/temp$$

Reasoning: The system always uses the first available slot when
creating a link.  Assuming that the system is not being used or is in
single user mode, no one will be deleting links from the /dev
directory.  After all but the temporary link have been removed and the
main link is recreated, it will occupy the highest slot.  All of the
other links will go below it.  The temporary link is created since the
main link may in fact come out below the temporary link.  However,
after all of the links have been created, the temporary link can be
removed and the main link will then be higher up that the rest of the
links.  This procedure must be followed every time you want to add a
link to a login device.

Robert Perlberg
Resource Dynamics Inc.
New York
{philabs|delftcc}!rdin!perl