08-18-2003
inittab solaris
Hi!
Is it possible to add more ttys in Solaris, like with inittab in Linux? I want to switch between the ttys with Alt F1+F2+F3 .... like Linux does.
How can i do this?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi guys,
For some reason a client has given us a Sun Netra T1 with Solaris 8 to administer for them. That's always good business. However, the other day we rebooted the machine and to our amazement, after doing the preliminary hardware tests, we got an error messgae saying that /etc/inittab was... (3 Replies)
Discussion started by: Ivo
3 Replies
2. AIX
Hello,
I'm having a problem starting the cron daemon automatically from inittab, let me provide the details below:
We are having five equally installed machines. One of them was upgraded in the past, one we upgraded recently, both from 5300-05-06 to 5300-07-01-0748. On the upgraded... (6 Replies)
Discussion started by: hybr1d
6 Replies
3. Solaris
Hi,
In Solaris 9 and below release we are using the rc script in inittab. I don't have much idea abt inittab in Solaris.
In Solris 9 and below:
We use rc3 script to start up the server. And we run database script before the rc3.
os:23:respawn:/etc/init.d/database start >/dev/null 2>&1... (7 Replies)
Discussion started by: kalpeer
7 Replies
4. Shell Programming and Scripting
Hi..
When i was just looking throught /etc/inittab file..
i had stuck with some problems that i dont known in shell scripts
Here how the lablel like
si
ca
lo
l1
etc works..
do scripts proivide any label features..
please help...
thanks in advance
esham (3 Replies)
Discussion started by: esham
3 Replies
5. Solaris
Hi,
I have a solaris 10 server,which has a process running that communicates with other system.I have made following entry in the inittab file.
PM15:s12345:respawn:/ncm/bin/communicator
PM15 : Unique process ID
s12345 : run levels
respawn : if anytime the process... (2 Replies)
Discussion started by: asalman.qazi
2 Replies
6. UNIX for Advanced & Expert Users
Hi
currently my linux instance is running in runlevel 3 ( someone has set the default to 3)
i have to change it to runlevel 5 . my question
1) does the editing of /etc/inittab needs system restart to enter runlevel 5.
2) how can we avoid system restart because if some users are... (3 Replies)
Discussion started by: rakeshkumar
3 Replies
7. UNIX for Dummies Questions & Answers
Today there was a situation where processes running from inittab was broken. Can someone help me understand, how to find out, who might have stopped those processes? Or how does it get broken?
G (2 Replies)
Discussion started by: ggayathri
2 Replies
8. UNIX for Dummies Questions & Answers
I am installing BusyBox on a device that does not have keyboard or serial connection, so I log into the system with SSH. I am in doubt about what to put in the inittab file. This is the content of the file:
::sysinit:/etc/init.d/rcS
::respawn:/bin/login
::shutdown:/sbin/swapoff -a... (1 Reply)
Discussion started by: richard78
1 Replies
9. Linux
Hi All,
I am booting by Linux box with the run level 3 and it gets booted successfully.
I want to execute a script once the system is up and running in the run level 3. I was trying to add a entry to /etc/inittab to execute my script once the system is up.
I have added the below... (5 Replies)
Discussion started by: kalpeer
5 Replies
10. Shell Programming and Scripting
Hi to all ,
i wrote a small script and i add it to inittab to start the script during Startup. The script works fine , if i call it from the prompt but if it is call from inittab it is runnng too but it does not recognize system variable like USER , LOGNAME.
Since i running out of ideas i... (12 Replies)
Discussion started by: Nadielosabra
12 Replies
LEARN ABOUT LINUX
ttyslot
TTYSLOT(3) Linux Programmer's Manual TTYSLOT(3)
NAME
ttyslot - find the slot of the current user's terminal in some file
SYNOPSIS
#include <unistd.h> /* on BSD-like systems, and Linux */
#include <stdlib.h> /* on System V-like systems */
int ttyslot(void);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
ttyslot():
_BSD_SOURCE ||
_XOPEN_SOURCE && _XOPEN_SOURCE_ < 500 && XOPEN_SOURCE_EXTENDED
DESCRIPTION
The legacy function ttyslot() returns the index of the current user's entry in some file.
Now "What file?" you ask. Well, let's first look at some history.
Ancient History
There used to be a file /etc/ttys in Unix V6, that was read by the init(8) program to find out what to do with each terminal line. Each
line consisted of three characters. The first character was either '0' or '1', where '0' meant "ignore". The second character denoted the
terminal: '8' stood for "/dev/tty8". The third character was an argument to getty(8) indicating the sequence of line speeds to try ('-'
was: start trying 110 baud). Thus a typical line was "18-". A hang on some line was solved by changing the '1' to a '0', signaling init,
changing back again, and signaling init again.
In Unix V7 the format was changed: here the second character was the argument to getty(8) indicating the sequence of line speeds to try
('0' was: cycle through 300-1200-150-110 baud; '4' was for the on-line console DECwriter) while the rest of the line contained the name of
the tty. Thus a typical line was "14console".
Later systems have more elaborate syntax. System V-like systems have /etc/inittab instead.
Ancient History (2)
On the other hand, there is the file /etc/utmp listing the people currently logged in. It is maintained by login(1). It has a fixed size,
and the appropriate index in the file was determined by login(1) using the ttyslot() call to find the number of the line in /etc/ttys
(counting from 1).
The semantics of ttyslot
Thus, the function ttyslot() returns the index of the controlling terminal of the calling process in the file /etc/ttys, and that is (usu-
ally) the same as the index of the entry for the current user in the file /etc/utmp. BSD still has the /etc/ttys file, but System V-like
systems do not, and hence cannot refer to it. Thus, on such systems the documentation says that ttyslot() returns the current user's index
in the user accounting data base.
RETURN VALUE
If successful, this function returns the slot number. On error (e.g., if none of the file descriptors 0, 1 or 2 is associated with a ter-
minal that occurs in this data base) it returns 0 on Unix V6 and V7 and BSD-like systems, but -1 on System V-like systems.
CONFORMING TO
SUSv1; marked as LEGACY in SUSv2; removed in POSIX.1-2001. SUSv2 requires -1 on error.
NOTES
The utmp file is found various places on various systems, such as /etc/utmp, /var/adm/utmp, /var/run/utmp.
The glibc2 implementation of this function reads the file _PATH_TTYS, defined in <ttyent.h> as "/etc/ttys". It returns 0 on error. Since
Linux systems do not usually have "/etc/ttys", it will always return 0.
Minix also has fttyslot(fd).
SEE ALSO
getttyent(3), ttyname(3), utmp(5)
COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
GNU
2010-09-20 TTYSLOT(3)