Saving TTY settings


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Saving TTY settings
# 1  
Old 04-17-2014
Saving TTY settings

I have 4 digi etherlite boards that allow Wyse and VT100 terminals to connect to our network (stop laughing) Smilie

We are switching from an older version of redhat where we have these running to: Red Hat Enterprise Linux Server release 6.5 (Santiago)

I finally got them working and copied the tty settings from the old machine to a file and then loaded them in to the new machine:

Saved via:
Code:
 stty --save /dev/ttya00 $i > /home/shared/IT/tty/ttya0

Then loaded on new machine with

Code:
 stty -F /dev/ttya0 `cat /home/shared/IT/tty/ttya0`

and this works fine.

The problem is that on the old machine I turned everything on via inittab (example below)

Code:
a0:2345:respawn:/sbin/agetty  19200 ttya00
a1:2345:respawn:/sbin/agetty  19200 ttya01
a2:2345:respawn:/sbin/agetty  19200 ttya02

I have no idea how to do this under the new version.

Like I said I have it working but it's not right

in my /etc/rc.d/rc.local i have things like this:

Code:
start tty TTY=/dev/ttya00
start tty TTY=/dev/ttya01
start tty TTY=/dev/ttya02
start tty TTY=/dev/ttya03
start tty TTY=/dev/ttya04
start tty TTY=/dev/ttya05

stty -F /dev/ttya0 `cat /home/shared/IT/tty/ttya0`
stty -F /dev/ttya1 `cat /home/shared/IT/tty/ttya1`
stty -F /dev/ttya2 `cat /home/shared/IT/tty/ttya2`
stty -F /dev/ttya3 `cat /home/shared/IT/tty/ttya3`
stty -F /dev/ttya4 `cat /home/shared/IT/tty/ttya4`

So my question is:

a) how do i save my settings so i don't have to load them each time?
b) how do i do something similiar to inittab to specify which tty's I want agetty/mgetty running on?

Thanks!

Last edited by bartus11; 04-17-2014 at 02:57 PM.. Reason: Please use [code][/code] tags.
# 2  
Old 04-17-2014
Why not specify the options you actually want, instead of loading from save all the time?
# 3  
Old 04-17-2014
Corona

I just want to be able to reboot and not have to reload them again.

and also not have to use "start tty" on each port (16 ports * 4 terminal servers)
# 4  
Old 04-17-2014
Quote:
Originally Posted by mp99
Corona

I just want to be able to reboot and not have to reload them again.
They have to come from somewhere. /etc/inittab is a decent place for them if you know the options you want.

stty appears to understand them if you just give it as arguments:

Code:
$ stty save
500:5:bf:8a3b:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0

$ stty 500:5:bf:8a3b:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0
$

# 5  
Old 04-17-2014
you can't put them inittab under RedHat EL 6.5, as I understand

it says:

# inittab is only used by upstart for the default runlevel.
#
# ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# 6  
Old 04-17-2014
yeah this seems to be an Upstart issue, which I'm not totally familiar with, but i booted into a CentOS VM and poked around /etc/init.

It seems start-ttys.conf works by iterating over ACTIVE_CONSOLES and starting new jobs like you do (start tty TTY=...). So I'd probably add to ACTIVE_CONSOLES (ACTIVE_CONSOLES=/dev/tty[1-6] /dev/ttya0[0-5]), and create a tty.override which does something like:

Code:
# load saved tty config if one exists
pre-start script
  [ -f "/home/shared/IT/tty/$TTY" ] && stty -F "/dev/$TTY" < "/home/shared/IT/tty/$TTY"
end script

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Python: Redirecting to tty and reading from tty

In bash, you can do something like this: #!/bin/bash echo -n "What is your name? " > /dev/tty read thename < /dev/tty How can I do the same in python? I have a python script that has the following content: #!/usr/bin/python2.7 import getpass import sys import telnetlib import... (2 Replies)
Discussion started by: SkySmart
2 Replies

2. AIX

Is there virc or exrc for saving vi configuration settings in AIX?

There's no Vim in AIX (6 and 7), but Vi is natively available. I want to save my configuration for Vi like `set nu` to number lines in files. I couldn't find configuration related to Vi in /etc/ or /usr/etc/ folders. Please help me with that. (4 Replies)
Discussion started by: Chinggis6
4 Replies

3. UNIX for Advanced & Expert Users

tty changes?

I am not sure if I am using the correct terminology but somehow my tty keeps changing on me. The man pages are confusing to me on what exactly the tty is. This is what I see when I run the tty command. Could anyone explain why my tty keeps changing? ~ $ tty /dev/pts/1 ~ $ tty /dev/pts/0 (6 Replies)
Discussion started by: cokedude
6 Replies

4. Solaris

tty hack

hi all, what i want to do when user open terminal like tty5 and do his work i want to see his terminal how can i do this (1 Reply)
Discussion started by: xxmasrawy
1 Replies

5. Solaris

Saving Font Settings

I've written some tools that don't like the default font setting that come up with the Common Desktop Environment. (The text on the buttons looks like the dingbat character set.) The work around is to go into the style manager and set the font to anything other than 'medium' which is the default.... (2 Replies)
Discussion started by: scottwevans
2 Replies

6. AIX

tty

Hi All can anyone tell me what is the meaning of tty,or give me an example of this? (1 Reply)
Discussion started by: magasem
1 Replies

7. UNIX for Dummies Questions & Answers

tty remote IP

I am fairly new to Unix Terminal outputs and I have a server that is sending print jobs to a PortServer 8 RJ45 situated in a remote location. It is working fine however we need to change the Subnet of that location and I am unable to find where the IP associated with the terminal is located. ... (4 Replies)
Discussion started by: martin_Montreal
4 Replies

8. UNIX for Dummies Questions & Answers

tty problem

Dear all, when I do a remote shell command from a FUJITSU Unix to an HP-UX, I always get this: 15:36:35 + rsh -l storto obs2 sh /users/obs/storto/MESO-NH/tmp_olive_map_00CC/job_prepex_70JY_C00CC_20041103_19 Not a terminal stty: : Erreur inconnue stty: : Erreur inconnue... (0 Replies)
Discussion started by: stortignauz
0 Replies

9. Programming

TTY programming

Hi gurus, Need help to code some tools dealing with all the tty thingies, raw mode etc .... Can you juss point me to some cool links related to tty programming, i've tried google but found none so far :confused: Thanks all. (2 Replies)
Discussion started by: andryk
2 Replies
Login or Register to Ask a Question