![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I'm a Linux noob with a series of (admittedly) stupid questions. My Google
skills have failed me, and I think I just need a bit of patient handholding...
My goal is to use an old internal modem to record incoming voice calls over a
phone line. I've found a few sites that give directions, such as:
http://frank.harvard.edu/~coldwell/answering_machine/
I've also spent some time poking around sites such as
http://www.ubuntuforums.org/, but I'm running into what I suspect are problems
stemming from my vast lack of understanding:
(#1) Every set of instructions I've come across talk about adding lines to the
/etc/inittab. Lines such as:
S0:345:respawn:/sbin/vgetty ttyS0
Ubuntu (8.04) doesn't appear to HAVE inittab anymore -- from what I gather, it's
been replaced by Upstart. How does one 'translate' the above line of code into
something I could add to Upstart? I gather actually adding it consists of
putting a file in the /etc/init.d directory?
I think the general point is to tell Ubuntu to run 'vgetty' (which, apparently,
is really mgetty-voice?) and pay attention to ttyS0.
(#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?
(#3) (Apologies for this) My vague understanding is that inittab/Upstart is the
rough equivalent of autoexec.bat from DOS, only... more low-level? You can
start/stop/monitor hardware as well as software. Am I even in the ballpark
with that vague understanding?
(#4) I'm rather confused as to 'getty' vs. 'mgetty' vs. 'vgetty'. After staring
at the man pages, I'm inclined to believe mgetty is an improved getty, and
vgetty adds voice support. I guess vgetty is really mgetty-voice, even though
everybody still refers to 'vgetty' as if it were separate. Anyone care to
smooth out my (mis)understanding?
(#5) So, if vgetty is a better mgetty, and mgetty is a super getty, then why, do
I have something like six virtual getty consoles (Ctr+Alt+F1...F6) by default?
Why do I WANT 6 virtual consoles?
Any advice from the Linux gurus would be greatly appreciated. I can't imagine
this is really all that complicated a project for someone who knows their way
around Linux. It looks like many people have done it... all with earlier
distros than what I've got, apparently.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Darren New
Subject: Re: inittab vs. Upstart and other questions [Ubuntu]
Date: 8 Apr 2009 12:09:20
Message: <49dccc30$1@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Darren New <dne### [at] san rr com> wrote:
> 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."
Thanks for the description. I hadn't made the connection to '345' being the
runlevel. *Is* there such a thing as a runlevel for Ubuntu? If so, how do I
determine what runlevel I'm currently at?
> I'm just trying to give you pointers to google on. :-)
Which is exactly what I need. Thanks!
> Be aware that not all modems can actually do voice, either.
Good point, although I think I've confirmed that it is.
> 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.
Aha! This makes more sense. Does this mean I can basically add any homemade
script I want into the init.d directory? For example, I could write a script
to write periodic statistics to a log file...?
> 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.
Okay, that makes sense. If I *am* running GNOME, then can I disable some of the
shells? It seems each one uses ~500K, and this old system is already
memory-deficient.
Thanks, Darren, for the help. (And patience!)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Darren New
Subject: Re: inittab vs. Upstart and other questions [Ubuntu]
Date: 8 Apr 2009 16:07:11
Message: <49dd03ef$1@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
How Camp wrote:
> *Is* there such a thing as a runlevel for Ubuntu?
I haven't seen a UNIX without a runlevel concept, since it escaped AT&T. :-)
> If so, how do I
> determine what runlevel I'm currently at?
You have an inittab in ubuntu? Look at the line that says something like
id:2:initdefault:
to see that you default to runlevel 2.
You use the telinit program to change runlevels. It sends signals to process
1, which is init.
> Aha! This makes more sense. Does this mean I can basically add any homemade
> script I want into the init.d directory? For example, I could write a script
> to write periodic statistics to a log file...?
Yes. It needs to start a long-running job. To get it to run with different
runlevels, you need to get it into the rc.d directory of the appropriate
number with the appropriate thingies on the front of the file name. Grope
around in there to see what I mean. There ought to be some sort of tool to
do this for you.
> Okay, that makes sense. If I *am* running GNOME, then can I disable some of the
> shells?
I would think so, yes. You can disable all but one, even in text mode, if
you really want.
> Thanks, Darren, for the help. (And patience!)
No problem.
--
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Darren New
Subject: Re: inittab vs. Upstart and other questions [Ubuntu]
Date: 8 Apr 2009 16:08:58
Message: <49dd045a@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
How Camp wrote:
> Aha! This makes more sense. Does this mean I can basically add any homemade
> script I want into the init.d directory? For example, I could write a script
> to write periodic statistics to a log file...?
This looks like it is helpful. Read all the way down:
http://nixcraft.com/linux-software/2654-ubuntu-set-default-runlevel-etc-inittab.html
--
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Darren New <dne### [at] san rr com> wrote:
> You have an inittab in ubuntu? Look at the line that says something like
> id:2:initdefault:
> to see that you default to runlevel 2.
No, apparently Ubuntu no longer has inittab -- it's been traded for Upstart,
which is where my initial confusion came from, as it's not obvious (to me) how
to translate from one to the other.
But...
> This looks like it is helpful. Read all the way down:
....This was an excellent link. Thank you very much! I think this points me in
the right direction.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Darren New
Subject: Re: inittab vs. Upstart and other questions [Ubuntu]
Date: 9 Apr 2009 12:20:57
Message: <49de2069$1@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
How Camp wrote:
> No, apparently Ubuntu no longer has inittab -- it's been traded for Upstart,
I see. Upstart looks pretty .. um ... maturely designed? The first version
of init stuff that doesn't look like "hey, we're writing in C and want to do
the minimal amount of work possible such that an expert who has read the C
we wrote could get things configured." :-)
--
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Nicolas Alvarez
Subject: Re: inittab vs. Upstart and other questions [Ubuntu]
Date: 11 Apr 2009 20:42:28
Message: <49e138f4@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Darren New wrote:
> How Camp wrote:
>> *Is* there such a thing as a runlevel for Ubuntu?
>
> I haven't seen a UNIX without a runlevel concept, since it escaped AT&T.
> :-)
runlevel(8) manpage says "This tool is provided for compatibility with the
traditional System V init(8). Upstart has no notion of runlevels itself,
this and the telinit(8) tool are provided to emulate their behaviour."
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Darren New
Subject: Re: inittab vs. Upstart and other questions [Ubuntu]
Date: 11 Apr 2009 21:48:17
Message: <49e14861$1@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Nicolas Alvarez wrote:
> runlevel(8) manpage says "This tool is provided for compatibility with the
> traditional System V init(8). Upstart has no notion of runlevels itself,
> this and the telinit(8) tool are provided to emulate their behaviour."
Yes. As I said, it looks very maturely architected, throwing out most of the
original minimal-effort baggage.
--
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |