[H-GEN] mgetty on RH 7.2

Robert Brockway robert at timetraveller.org
Thu Feb 21 12:13:55 EST 2002


[ Humbug *General* list - semi-serious discussions about Humbug and  ]
[ Unix-related topics.  Please observe the list's charter.           ]
[ Worthwhile understanding: http://www.humbug.org.au/netiquette.html ]

On Fri, 22 Feb 2002, Scott Pullen wrote:

> Maybe it is time to go with a simpler??? option.  Where can I find
> information about using getty_ps to monitor the serial port ? Will it handle

Warnign: many would not consider getty_ps to be simpler then mgetty :)

Anyway, here is an example getty_ps line to put in /etc/inittab...

# Getty_ps on ttyS3
S3:2345:respawn:/sbin/gettyps ttyS3 115200

> I am still a little grey on how the other end obtains an IP address.  Is that

It is part of the PPP protocol to send the IP to the remote end if it
asks.  One side needs to have a clue of course - this is normally the
server.  The client simple does an ipcp-accept-local & ipcp-accept-remote
in Linux parlance.

Tis late but here are some details of how I did it.  This should get you
started.

Some relevant files:

blake:~>cat /etc/ppp/peers/dialin
ttyS3 115200
lock
login
noauth
crtscts
asyncmap 0
proxyarp
bsdcomp 15,15

I gave each dialin PPP user an account on the box:

blake:~>cat /usr/local/bin/ppp-dialin
#!/bin/bash

# Setup dialin ppp connections

# Parameters
LOCAL=203.46.133.193
REMOTE=`nslookup $USER | cut -b 11-24 | grep 203.46.133 | tail -n 1`

# Setup pppd with the right IPs,etc. 
/usr/sbin/pppd $tty 115200 $LOCAL:$REMOTE call dialin

This grabs the IP from the dns where I had put it and slots it into pppd
line.  As you can see, it is using nslookup, showing some vintage :)  In
acrtual fact I haven't used this for a few months, but it was running for
some years so I know it works :)

I use this script as the shell for the user:

blake:~>finger gan
Login: gan                              Name: gan.timetraveller.org
Directory: /home/gan                    Shell: /usr/local/bin/ppp-dialin
Never logged in.
No mail.
No Plan.

There is really no need to link it into the dns, you could just hardwire
the IP in to the pppd line.  Tying the IPs to the username produces a
"static IP" effect, while tying them to the port produces a "dynamic IP
effect".

See how this goes.
Rob

-- Robert Brockway B.Sc. email: robert at timetraveller.org  ICQ: 104781119
   Linux counter project ID #16440 (http://counter.li.org)
   blake: up 43 days,  1:30, 12 users,  load average: 1.00, 1.00, 1.00
   "The earth is but one country and mankind its citizens" -Baha'u'llah



--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.



More information about the General mailing list