[comp.unix.xenix] telinit, /etc/ringback

root@libove.UUCP (Jay M. Libove) (10/26/88)

There was a program posted sometime in September 1988 (give or take a
month) called "ringback", which was supposed to sit on a modem tty line
and look for incoming RINGs, and if it got one, to enable the line to
answer the phone on the _next_ phone call that came in..


Well, I want to use it for my SCO Xenix 2.2.1 system, but it requires
using "telinit", a not-well-supported feature on SCO Xenix 2.2.1.


Can someone help me with exactly how to use telinit on SCO Xenix (or
even in general. My manual page is essentially useless for it), and
especially if you have gotten the ringback program to work for you.


Thanks in advance!

-- 
Jay Libove		ARPA:	jl42@andrew.cmu.edu or libove@cs.cmu.edu
5731 Centre Ave, Apt 3	BITnet:	jl42@andrew or jl42@drycas
Pittsburgh, PA 15206	UUCP:	uunet!nfsun!libove!libove or
(412) 362-8983		UUCP:	psuvax1!pitt!darth!libove!libove

sandy@turnkey.TCC.COM (Sanford 'Sandy' Zelkovitz) (10/30/88)

In article <8315@rpp386.Dallas.TX.US>, jfh@rpp386.Dallas.TX.US (The Beach Bum) writes:
> In article <183@libove.UUCP> root@libove.UUCP (Jay M. Libove) writes:
> >Well, I want to use it for my SCO Xenix 2.2.1 system, but it requires
> >using "telinit", a not-well-supported feature on SCO Xenix 2.2.1.
> 
> telinit is an unsupported feature on 2.2.1.  It is used to signal
> init to re-read the inittab, which is completely unsupported [ from
> init's perspective ] under 2.2.x
> 
The REAL purpose of telinit is to allow special run levels a, b,  and c.
You see, in the REAL init, you can have run levels of S(s),0, 1, 2, 3, 4,
5, and 6. Run levels a, b, and c are special cases where programs can
be run from the inittab without exiting the present run level. SCO
decided to stay with the old SysIII style using /etc/ttys. Under SysV,
init reads a file called /etc/inittab. With this in mind, you can have many
different version of getty depending on the usage requirements. According
to convention, run level 2 is considered the multi-user run level; however,
this is not necessary since you can have any run level from 2-6 as a
multi-user level. The nice feature is that you can have different
configurations for each run-level. Basically, what I mean is which getty
you prefer on each port or at which baud rate you so desire. 
 
You can have special programs selected in your inittab for run levels
a, b, and c. Telinit will run these for you. BTW, to cause init to re-read
the inittab, what you use is a command called "init q". Please remember
that none of these functions are available using the SCO distribution.
If you would REALLY like to have all of these capabilities, you can call
my BBS at 714-898-8634 and download a REAL init, telinit, and a
sample inittab. The code works just fine under Xenix286 and Xenix386.
 
Sanford <sandy> Zelkovitz    XBBS   714-898-8634

allbery@ncoast.UUCP (Brandon S. Allbery) (11/07/88)

As quoted from <2425@turnkey.TCC.COM> by sandy@turnkey.TCC.COM (Sanford 'Sandy' Zelkovitz):
+---------------
| In article <8315@rpp386.Dallas.TX.US>, jfh@rpp386.Dallas.TX.US (The Beach Bum) writes:
| > In article <183@libove.UUCP> root@libove.UUCP (Jay M. Libove) writes:
| > >Well, I want to use it for my SCO Xenix 2.2.1 system, but it requires
| > >using "telinit", a not-well-supported feature on SCO Xenix 2.2.1.
| > 
| > telinit is an unsupported feature on 2.2.1.  It is used to signal
| > init to re-read the inittab, which is completely unsupported [ from
| > init's perspective ] under 2.2.x
| 
| be run from the inittab without exiting the present run level. SCO
| decided to stay with the old SysIII style using /etc/ttys. Under SysV,
+---------------

Microsoft (not SCO) decided to stay with the V7 init.  System III has an
inittab, although it's different from the System V one in both form and
intent:  there are still run levels (1-6), but init doesn't maintain utmp at
all.  Init is simply and solely a process spawner under System III.

For the curious, here's a slice of a System III /etc/inittab:

1:co:c:/bin/env HOME=/ TZ=EST5EDT LOGNAME=root PATH=/bin:/etc:/usr/bin:/usr/local/bin:/usr/plx /bin/sh</dev/console>/dev/console 2>&1
1:xx::/etc/getty console ! 0 
2:co:c:/etc/getty console b
2:00:c:/etc/getty tty0 c
2:01:c:/etc/getty tty1 c
2:02:o:/etc/getty tty2 c

The init command field (field 3) consists of flags:

c	respawn command ("respawn")
o	do nothing ("off")
k	send "kill -9" to process group if command running
t	send "kill -15" to process group if command running

Usually, one uses "c" for always-running processes, "o" for always-disabled
entries (such as for unused ttys; the effect is that the line is a comment),
and "kto" when an entry is sometimes on and sometimes off (the "kt" makes
sure the currently-running process group gets killed).  It's not as flexible
as System V, but it works and it's somewhat more flexible than V7.  There is
no "telinit" command; one says "init 2" (or whatever) to change init
states.  The only way to find out the current init state is with "ps":

Script started on Sun Nov  6 13:08:36 1988
3@ncoast:1 % ps -fp 1
    UID   PID  PPID  C   STIME TTY  TIME COMMAND
   root     1     0  0  Oct  8   ?  4:48 INIT 2
3@ncoast:2 % 
script done on Sun Nov  6 13:08:58 1988

++Brandon
-- 
Brandon S. Allbery, comp.sources.misc moderator and one admin of ncoast PA UN*X
uunet!hal.cwru.edu!ncoast!allbery  <PREFERRED!>	    ncoast!allbery@hal.cwru.edu
allberyb@skybridge.sdi.cwru.edu	      <ALSO>		   allbery@uunet.uu.net
comp.sources.misc is moving off ncoast -- please do NOT send submissions direct
      Send comp.sources.misc submissions to comp-sources-misc@<backbone>.