[NTLUG:Discuss] Magically appearing pppd parameters.

Richard Geoffrion ntlug at rain4us.net
Tue Sep 13 18:25:28 CDT 2005


Problem:  pppd gets "unrecognized option '--' " passed to it when being 
called from agetty.

Background:
*Slackware Linux 8.1, kernel 2.4.27,
*pppd versions 2.4.1 then 2.4.4b,
*Hylafax versions 4.1.7, 4.2.1, then 4.2.2rc1 (to fix an issue related 
to data calls)

Now for what I've done..and why it SHOULD work, but isn't.

# faxgetty (from hylafax) is run in inittab.
** # Hylafax faxgetty - 2003/08/07
** h7:345:respawn:/usr/local/sbin/faxgetty /dev/ttyS7

# the /var/spool/hylafax/etc/config.ttyS7 file contains the following 
options so that it can handle data calls.
**GettyArgs:                  "-n -l /usr/sbin/pppd %l %s"
(These parameters mean -no_login_prompt -login_program_to_use=pppd
  ttyS7 38400 {see below} )
**AdaptiveAnswer:         yes
**AnswerRotary:           "data"
--->(per faxgetty documentation[man hylafax-config] the %l and %s 
variables refer to, in our case, %l - ttyS7 and %s - 38400)

< snippet of man hylafax-config >
A  string that indicates whether or not the server should invoke the 
getty(8C) pro-
              gram in response to an incoming call from a data modem.  
If the string value is not
              null,  then  it  is interpreted as a set of arguments to 
pass to the getty program.
              Before supplying the arguments,  the  string  is  first  
scanned  for  ``%''-escape
              sequences:  any  appearance of ``%l'' is replaced with the 
tty name and any appear-
              ance of ``%s'' is replaced with the serial port  speed  
(in  decimal).   The  ``%''
              character  can  be specified with ``%%''.  If the 
GettyArgs parameter is not speci-
              fied in the configuration file or if the string value is 
null,  then  data  connec-
              tions  will be rejected.  Note that in addition to the 
specified command line argu-
              ments, the getty program is invoked with its  standard  
input,  output,  and  error
              descriptors directed to the controlling tty device.
</ end snippet >

# For reference, this is what is in my /etc/ppp/options file
< options file>
nodetach
local
passive
linkname dialin
logfile /var/log/pppd-dialin #nothing gets logged here so far!!!
proxyarp
debug
dump
10.1.27.1:10.1.27.210
ms-dns 10.1.27.1
ms-wins 10.1.27.1
< /options file>

#Upon receipt of an incoming call, this is what the logs show...

==> /var/log/messages <==
Sep 13 17:56:27 gwifs FaxGetty[8299]: MODEM MULTI-TECH SYSTEMS 
MT2834ZDX/0316D
Sep 13 17:57:31 gwifs FaxGetty[8299]: ANSWER: DATA CONNECTION
Sep 13 17:57:31 gwifs FaxGetty[8299]: GETTY: START "/sbin/agetty -n -l 
/usr/sbin/pppd ttyS7 38400", pid 8318
Sep 13 17:57:32 gwifs FaxGetty[8299]: GETTY: exit status 01000

==> /var/log/syslog <==
Sep 13 17:57:31 gwifs pppd[8318]: unrecognized option '--'

------------------------------------------------------

Now, if change my gettyargs to:

GettyArgs:  "-t60 %s %l"

I can get /bin/login, I can login, I can su to root, then I can manually 
launch pppd with NO parameters...and VOILA! I have PPP to the client.

So... what am I doing wrong?! How do I diagnose this? What piece of 
information am I missing?  Which google search term will give me the 
results for someone -- ANYONE who has successfully run pppd as a login 
program for agetty!??!?!?!

I'm not going to admit to how long I've been working on this, but I have 
built quite an impressive string of brute-force attacks on this 
GettyArgs parameter! :)

help!!

-- 
The pppd-less one.
*the preceding post was made in part pmwiki, part pseudo-html, part 
plain text and all desperation.







More information about the Discuss mailing list