Index rhl38 (3) chip 5 Orson Scot Card Cien Endera rozdzial 05 (193) Nisargadatta Maharaj Rozmowy z medrcem (brak wstępu) Janusz A. Zajdel Limes Inferior (2) Johnson P. Bóg 306 33 (3) AD&D The Complete Ninja's Handbook 03 (19) |
[ Pobierz całość w formacie PDF ] .After the mknod command has been executed, the device driver must be set to the proper ownership.Issue the commandchown root.tty /dev/ttyS0replacing the /dev/ttyS0 with whatever device the command applies to.The ownership is set to root.tty.You also want to change the entry in the /etc/ttys file to include the terminal type and device that you have added so that the startup of the terminal can be performed properly.Because the /etc/inittab file already contains entries for the standardserial ports, you can edit the entry for your new terminal's port (if necessary) to set the baud rate and other parameters that may be required.Using stty and tsetThe stty command enables you to change and query a terminal option.The stty command is very complex, with dozens of options that modify the behavior of the terminal device driver.Luckily, only the most intense system administrators have to use themany options, so in this chapter we will ignore most of the details.To see the current settings of a terminal, use the stty command without any arguments.It displays a set of parameters.You can use this to verify that the terminal has read the configuration information properly from the /etc/inittab and /etc/gettydefsfiles.Like stty, the tset command has many options, most of which are seldom used (especially if you are not dealing with strange terminals and weird connectors).The tset command is used to initialize the terminal driver.If the tset command is given with aspecific argument, it uses that.Otherwise, the value in the TERM environment variable is used.You can use tset within the startup files of a user who always logs in from a remote terminal (through a modem).If you put the commandtset -m dialup:vt100in the shell startup file (.profile,.cshrc, and so on), the terminal type will be set to vt100 every time a connection is made through the modem.Of course, this sets the terminal type even if someone isn't using a VT100 terminal, so you can use thecommandtset -m dialup:?vt100to have the user connecting through the modem prompted for the terminal type.The prompt looks like this:TERM=(vt100)?If the user presses Enter, the TERM variable is set to vt100.If the user doesn't want to use that value, she can enter the correct string at the prompt.So far, tset seems to be quite simple, but in fact it has a very complex structure when dealing with hard wired terminals.To properly configure a terminal connected through a serial port, you need a command such as this:eval 'tset -s -Q -m dialup:?vt100 -m switch:z29'The full details of this type of command are unimportant for most system administrators.If you want more information, check the man pages for tset and stty that came with your Linux system.Resetting a Screwy TerminalEvery now and then a terminal connected through a serial port starts acting screwy, either not showing a prompt or generating garbage.There are two quick ways to try to reset the terminal.If they don't work, the terminal should be shut down andrestarted.(You might have to kill the processes that were running on the terminal.)The first approach is to issue a set of Ctrl-J characters on the screwy terminal, and then type stty sane followed by another Ctrl-J.The command stty sane should reset the terminal characteristics to normal.You probably won't see the letters you aretyping, so enter them carefully.If the terminal isn't behaving at this point, try typing reset and pressing Enter or Ctrl-J.If this doesn't work, the terminal has hung and should be reset manually.Adding a ModemThe process for adding a modem is very similar to that for adding a terminal.In most cases, the procedure outlined earlier in "Adding a Terminal" can be followed.Modems are used for several purposes on a Linux system, such as networking, connecting to remote systems, and accepting incoming calls.If the modem is to act as a conduit into the Linux system for remote terminals to connect, the procedure given in"Adding a Terminal" is followed, except for the entries that will be selected in the /etc/inittab file.In the case of a modem, find a set of lines that move through the different baud rates the modem supports.Modems that are to be used for networking through the UUCP utility are dealt with in Chapter 42, "Networking," and Chapter 43, "UUCP." It includes information on setting the differentconfiguration files properly.For modems used to call out of the system, Linux has a menu-driven configuration utility as part of the setup command, which can set the proper configuration information automatically.SummaryThis chapter has shown you the basics of devices, device management, and how to add new devices to your Linux system.The information presented applies to most distributions of Linux, although there might be some slight changes in options and argumentsas the different utilities are enhanced or streamlined.If you want more information about any of the commands, refer to the man pages that came with Linux, or consult a comprehensive system administration book [ Pobierz całość w formacie PDF ] |
||||
Wszelkie Prawa Zastrzeżone! Kawa była słaba i bez smaku. Nie miała treści, a jedynie formę. Design by SZABLONY.maniak.pl. | |||||