pppd kill ? - PPP

This is a discussion on pppd kill ? - PPP ; hello, I have written a small script , the purpose of the script is to 1] start pppd 2] do file transfer through ftp 3] then drop pppd (using pkill pppd) "pkill pppd" works well on the command prompt , ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: pppd kill ?

  1. pppd kill ?

    hello,
    I have written a small script , the purpose of the script is to
    1] start pppd
    2] do file transfer through ftp
    3] then drop pppd (using pkill pppd)

    "pkill pppd" works well on the command prompt ,
    but "pkill pppd" doesn't work when included in the script(point 3,
    above)
    following is the complete script .
    please see the comment for the exact problem area


    START SCRIPT
    #!/bin/sh
    HOST=''
    USER='user'
    PASSWD='password'

    pppd call gprs > /dump &
    sleep 20

    ftp -in $HOST < quote USER $USER
    quote PASS $PASSWD
    bin

    lcd /rpms/outbox/
    mput *
    quit
    pkill pppd.........................(this command is not working)
    END_SCRIPT
    exit
    END SCRIPT


  2. Re: pppd kill ?

    well the above problem was solved !
    the unwanted indention added the bug!


  3. Re: pppd kill ?

    "vicks" writes:
    > ftp -in $HOST < > quote USER $USER
    > quote PASS $PASSWD
    > bin
    >
    > lcd /rpms/outbox/
    > mput *
    > quit
    > pkill pppd.........................(this command is not working)
    > END_SCRIPT


    "pkill" isn't a command understood by /usr/bin/ftp, so sending it to
    that command on stdin won't work.

    What you probably want is to switch those last two lines -- END_SCRIPT
    first (to terminate the ftp standard input here-doc) and then pkill.

    --
    James Carlson, KISS Network
    Sun Microsystems / 1 Network Drive 71.234W Vox +1 781 442 2084
    MS UBUR02-212 / Burlington MA 01803-2757 42.497N Fax +1 781 442 1677

  4. Re: pppd kill ?

    "vicks" writes:


    > ftp -in $HOST < > quote USER $USER
    > quote PASS $PASSWD
    > bin


    > lcd /rpms/outbox/
    > mput *
    > quit
    > pkill pppd.........................(this command is not working)
    > END_SCRIPT
    >exit
    > END SCRIPT



    It does not work because you are sending it to the remote machine which you
    are ftping to. (actually since you have closed ftp, you are sending it into
    the ether) Why should ftp on the remote machine know anything about
    pppd . Get that line OUTSIDE the END_SCRIPT.


+ Reply to Thread