POV-Ray : Newsgroups : povray.off-topic : inittab vs. Upstart and other questions [Ubuntu] : Re: inittab vs. Upstart and other questions [Ubuntu] Server Time
5 Sep 2024 23:17:57 EDT (-0400)
  Re: inittab vs. Upstart and other questions [Ubuntu]  
From: Darren New
Date: 8 Apr 2009 12:09:20
Message: <49dccc30$1@news.povray.org>
How Camp wrote:
> S0:345:respawn:/sbin/vgetty ttyS0
> I think the general point is to tell Ubuntu to run 'vgetty' (which, apparently,
> is really mgetty-voice?) and pay attention to ttyS0.

This line says "run /sbin/vgetty with the argument ttyS0" and restart it 
each time it exits. Run it at runlevels 3, 4, and 5, which are the multiuser 
runlevels. I fear I don't remember what the S0 is, altho I suspect it means 
"kill it if you go single-user or shut down."

My knowledge is coming from UNIX variants that all predated Linux, so take 
it with a grain of salt. I'm just trying to give you pointers to google on. :-)

> (#2) How do I know my internal modem is at ttyS0 (or elsewhere)?  Is there a way
> to 'ping' through my ports until I find the right location?

S0 means serial port 0. Maybe looking at the boot messages (dmesg?) would 
reveal where the modem gets initialized.

Be aware that not all modems can actually do voice, either.

> (#3) (Apologies for this) My vague understanding is that inittab/Upstart is the
> rough equivalent of autoexec.bat from DOS, only... more low-level? 

inittab gives the list of programs that should always be running, or which 
should run before anything else at boot time. Stuff like "start the login 
scripts" or "start the cron scheduler." DOS doesn't really have an 
equivalent.  The numbers near the start say when particular programs should 
be running.

Basically, with inittab, the system boots, and once all the drives are 
mounted and all that, the "init" program reads inittab and starts the 
indicated programs. The getty so started opens the serial port, waits for 
characters, sets the speed and stop bits and such appropriately based on 
what it sees, and replaces itself with login. Login prompts for user name 
and password, changes the user ID appropriately, and replaces itself with 
the right shell.  When the shell exits, init sees its child process (nee 
getty) has died, and respawns a new one.

init.d on the other hand looks through the directory, figures out what order 
to start the various servers in, and invokes the shell scripts with the 
appropriate arguments (usually "start"). You can manually invoke the shell 
scripts to change whether something is running or not, or invoke them with 
an argument that says to exit with a return code indicating whether it's 
running or not. Each script is responsible for dealing with its own 
subsystem in entirety, including keeping track of which process is running 
the server and so on.

> You can start/stop/monitor hardware as well as software.  

Inittab doesn't do hardware. And it's hard to start and stop processes, and 
init (the first program that starts after boot) is the only one doing the 
monitoring.

With init.d, you have independent files for each service, like NFS, mail, 
web server, etc. Those you can start and stop and monitor independently.

> (#4) I'm rather confused as to 'getty' vs. 'mgetty' vs. 'vgetty'.

I'm afraid I can't help with that one.

> Why do I WANT 6 virtual consoles?

If you're not running graphics (i.e., X Windows, GNOME, KDE, etc) then it 
gives you six separate shells/logins. Sort of like having multiple monitors 
- it gives you more room.

-- 
   Darren New, San Diego CA, USA (PST)
   There's no CD like OCD, there's no CD I knoooow!


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.