More Questions about Sun OS/ATT Merged UNIX.

John Chambers jc at minya.UUCP
Sat Mar 5 13:53:58 AEST 1988


>   In the current SunOS3 implementation, if the first thing in your path
> is "/usr/ucb" you get a BSDish environment, while if it is "/usr/5bin"
> you get a SysV environment.
> 

There's one thing very different that has bitten me lately; maybe some
reader out there has the perfect solution.

On a couple of Suns I've been working on, I have a need of running a
different program on some ports than /etc/getty; I'd also like to run
some background daemons not associated with a port, and guarantee that
they will be restarted if they die.  On Sys/V (in fact, on all Unices
I've ever seen except BSD and Sun), this is easy.  You just edit the
/etc/inittab file, and put whatever programs you want in the command.
F'rinstance, if your inetd or sendmail insists on bombing every 37
hours or so, you remove the command that starts it from /etc/rc and
put it into /etc/inittab, with 'respawn' in the 3rd field.

On BSD/Sun systems, init seems to come hard-wired with knowledge of
/etc/getty; there's only an /etc/ttys file to say where to run getty;
there's no /etc/inittab file at all.  This seems like a major loss,
as it eliminates a large class of killable daemons.

The only solution I've heard so far is to supplant /etc/getty with
my own program that has its own control file (I'm tempted to call
it "/etc/inittab" :-), which tells it where to run the real getty
and where to run something else.  Sure, I could do this, but it
seems a whole lot like re-inventing a wheel that comes with all
other Unix systems.  

Anyone got a better solution?  Perhaps RTFM, with page numbers?
Is there a Sys/V init lurking somewhere in Sun's libraries?  Is
there a PD version of init that I can install?
-- 
John Chambers <{adelie,ima,maynard,mit-eddie}!minya!{jc,root}> (617/484-6393)



More information about the Comp.unix.wizards mailing list