ppp-on connect script failed by "Ambiguous redirect" ??

ppp-on connect script failed by "Ambiguous redirect" ??

Post by Oo.et.o » Sat, 20 Mar 1999 04:00:00



Hello-
        I have been struggling with this on and off for a few months now.  I
can connect fine via minicom, and also via Redhat's Netcfg app.
in /var/log/messages I get:
Mar 19 17:05:56 byzantine kernel: CSLIP: code copyright 1989 Regents of
the University of California
Mar 19 17:05:56 byzantine kernel: PPP: version 2.3.3 (demand dialing)
Mar 19 17:05:56 byzantine kernel: PPP line discipline registered.
Mar 19 17:05:56 byzantine kernel: registered device ppp0
Mar 19 17:05:56 byzantine pppd[18422]: pppd 2.3.5 started by eric, uid
500
Mar 19 17:05:57 byzantine pppd[18422]: Connect script failed
Mar 19 17:05:58 byzantine pppd[18422]: Exit.
Mar 19 17:07:23 byzantine kernel: PPP: ppp line discipline successfully
unregistered

in my debug log I get:
/etc/ppp/ppp-on-dialer: : Ambiguous redirect  

here is my ppp-on:
#!/bin/sh

# These are the parameters. Change as needed.
TELEPHONE=2713800       # The telephone number for the connection
ACCOUNT=name         # The account name for logon (as in 'George Burns')
PASSWORD=password       # The password for this account (and 'Gracie
Allen')
LOCAL_IP=0.0.0.0        # Local IP address if known. Dynamic = 0.0.0.0
REMOTE_IP=0.0.0.0       # Remote IP address if desired. Normally 0.0.0.0
NETMASK=255.255.255.0   # The proper netmask if needed
#
# Export them so that they will be available at 'ppp-on-dialer' time.
export TELEPHONE ACCOUNT PASSWORD
echo $TELEPHONE

and ppp-on-dialer:
#!/bin/sh
#

echo "in ppp-on-dialer"
/usr/sbin/chat -v \
        TIMEOUT         3                               \
        ABORT           '\nBUSY\r'                      \
        ABORT           '\nNO ANSWER\r'                 \
        ABORT           '\nRINGING\r\n\r\nRINGING\r'    \
        ''              ATZ                             \
        'OK-+++\c-OK'   ATH0                            \
        TIMEOUT         30                              \
        OK              ATDT$TELEPHONE                  \
        CONNECT         '^M'                            \
        name>           $ACCOUNT                        \
        assword>        $PASSWORD                       \
        'OK>'           'set port ppp enable^M'

pppd is suid root.  but that doesn't matter since I get the same errors
when I run as root.  note that it doesn't seem to get anywhere in the
ppp-on-dialer
there is no sign of chat in /var/log/messages and the echo on the first
line never comes out.
but the log says "Ambiguous redirect"  

                any help would be greatly appreciated.
BTW the serial ports are running as modules but never get taken out of
mem since I have a UPS connected to ttyS0.
ppp is also a module but it starts/exits fine as shown in
/var/log/messages.

                thanks-
                        eric

 
 
 

ppp-on connect script failed by "Ambiguous redirect" ??

Post by Clifford Ki » Sat, 20 Mar 1999 04:00:00


: in my debug log I get:
: /etc/ppp/ppp-on-dialer: : Ambiguous redirect  

: and ppp-on-dialer:
: #!/bin/sh
: #

: echo "in ppp-on-dialer"
: /usr/sbin/chat -v \
:       TIMEOUT         3                               \
:         ABORT           '\nBUSY\r'                      \
:         ABORT           '\nNO ANSWER\r'                 \
:         ABORT           '\nRINGING\r\n\r\nRINGING\r'    \
:       ''              ATZ                             \
:         'OK-+++\c-OK'   ATH0                            \
:         TIMEOUT         30                              \
:         OK              ATDT$TELEPHONE                  \
:         CONNECT         '^M'                            \
:       name>           $ACCOUNT                        \

The `>' is redirection for standard output and needs protection from
the shell.  Try

'name>'              $ACCOUNT

instead.

:         assword>        $PASSWORD                       \
:       'OK>'           'set port ppp enable^M'
        ^^^^^
Here it's done correctly.

--

/* The signal-to-noise ratio is too low in many [news] groups to make
 * them good candidates for archiving.
 *    --- Mike Moraes, Answers to FAQs about Usenet */

 
 
 

1. "Ambiguous redirect" error on a simple shell script

Hi everyone,

When I run the following shell script I get an "ambiguous redirect" error
message; specifically, "ambiguous redirect1", and I can't figure out why.

Here are the contents:

######################
#/bin/bash
echo "hello" >> ./test.log 2>&1
#######################

That's it.  Pretty short one.

I'm using RedHat Linux, recent version, maybe a few months old.

Seems the shell doesn't like my "2>&1" for whatever reason, but when I tried
the same script on Solaris I had no problems?  If you have any tips I'd be
grateful.  Thanks.

-Jim

2. Goood terminfo type for Okidat 3410

3. RH 5.1 and PPP - "Connect script failed"

4. Episode of a bunch of lost files

5. PPP using PAP "Connect script failed"

6. ghostscript problems...

7. "Connect script failed" when I run ppp-go (Slackware)

8. Winmodem

9. : Weird ">" redirect behavior vs. ">>" redirect behavior

10. Redirecting csh alias output is "Ambiguous"?

11. GETSERVBYNAME()????????????????????"""""""""""""

12. "connect" between "bind" and "listen"

13. Help with grep: "Ambiguous" in csh script