Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 266174 - sys-apps/openrc ppp chat script badly parsed
Summary: sys-apps/openrc ppp chat script badly parsed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard: openrc:oldnet:pppd due:2011/01/01
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-14 22:23 UTC by Matteo 'The Peach' Pescarin
Modified: 2011-02-16 17:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matteo 'The Peach' Pescarin 2009-04-14 22:23:47 UTC
I was configuring /etc/conf.d/net for GPRS/UMTS ppp connection but it never reached the modem initialization, following net.example the script was this:

config_ppp0=( "ppp" )
link_ppp0="/dev/rfcomm0"
phone_number_ppp0=( "*99#" )
username_ppp0=''
password_ppp0=
pppd_ppp0=(
       "maxfail 10"
       "debug"
       "noauth"
       "defaultroute"
       "usepeerdns"
#       "demand"
       "ipcp-accept-remote"
       "ipcp-accept-local"
       "holdoff 3"
       "lcp-echo-interval 5"
       "lcp-echo-failure 12"
       "noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp"
       "lock"
       "912600"
       "nocrtscts"
       "noipdefault"
)
chat_ppp0=(
      'ABORT' 'BUSY'
      'ABORT' 'ERROR'
      'ABORT' 'NO ANSWER'
      'ABORT' 'NO CARRIER'
      'ABORT' 'NO DIALTONE'
      'ABORT' 'Invalid Login'
      'ABORT' 'Login incorrect'
      'TIMEOUT' '5'
      '' 'ATZ'
      'OK' 'AT+CGDCONT=1,"IP","ibox.tim.it",,0,0'
      'OK' 'ATDT\T'
      'TIMEOUT' '60'
      'CONNECT' ''
      'TIMEOUT' '5'
      '~--' ''
)

and the log reported:
pppd[3951]: speed 912600 not supported
chat[4041]: abort on (BUSY)
chat[4041]: abort on (ERROR)
chat[4041]: abort on (NO)
chat[4041]: expect (ANSWER)
chat[4041]: alarm
chat[4041]: Failed
pppd[3951]: Connect script failed

using this oneliner everything worked fine:
pppd connect '/usr/sbin/chat -v ABORT "NO CARRIER" "" "AT" OK "AT+CGDCONT=1,\"IP\",\"ibox.tim.it\"" OK "ATDT*99#" CONNECT' /dev/rfcomm0 115200 defaultroute crtscts noauth deflate 0 asyncmap 0 mtu 1500 mru 1500 noipdefault idle 600

the log's showing:
pppd[12056]: pppd 2.4.4 started by root, uid 0
hcid[27548]: link_key_request (sba=00:0A:3A:63:21:B7, dba=00:12:62:A8:12:FE)
chat[12064]: abort on (NO CARRIER)
chat[12064]: send (AT^M)
chat[12064]: expect (OK)
chat[12064]: AT^M^M
chat[12064]: OK
chat[12064]:  -- got it 
....

Modifying the chat section to reflect it, changed nothing:
chat_ppp0=(
       "ABORT" "NO CARRIER"
        "" "AT"
        OK "AT+CGDCONT=1,\"IP\",\"ibox.tim.it\""
        OK "ATD*99#"
        CONNECT
)

this is the log:
pppd[6278]: pppd 2.4.4 started by root, uid 0
/etc/init.d/net.ppp0[4898]: WARNING: net.ppp0 has started, but is inactive
hcid[27548]: link_key_request (sba=00:0A:3A:63:21:B7, dba=00:12:62:A8:12:FE)
chat[6287]: abort on (NO)
chat[6287]: expect (CARRIER)
chat[6287]: alarm
chat[6287]: Failed
pppd[6278]: Connect script failed

it seems that quoted strings with spaces are badly parsed
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-12-21 23:09:14 UTC
(In reply to comment #0)

> it seems that quoted strings with spaces are badly parsed
> 

Has that status changed in 0.6.0?
Comment 2 Kanstantsin Shautsou 2010-08-14 21:44:39 UTC
Change =( to ="
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-12-12 02:14:25 UTC
Updating whiteboard for tracking.

Is this fixed with new openrc (and the quoting change)? Please test and report back by 2011/01/01, or we will close as assuming it works nowl.
Comment 4 William Hubbs gentoo-dev 2011-02-16 17:03:14 UTC
(In reply to comment #3)
> Updating whiteboard for tracking.
> Is this fixed with new openrc (and the quoting change)? Please test and report
> back by 2011/01/01, or we will close as assuming it works nowl.

Closing due to no response. Feel free to re-open if this is still an issue.