Charlie Freckleton wrote:

> I currently use 'dip' to connect to my ISP, which I invoke manually
> when needed. I'm now interested in using diald to connect as and when
> necessary, but all of the examples I've seen seem to use 'chat', not
> 'dip'.
> Could somebody give me an idea of how to use my existing method of
> connection alongside 'diald' ? (Really simple will do, as I can trawl
> through the filters later)
>
> System is based upon Redhat 5.2 with kernel 2.0.36
>
> Cheers,
>         Charlie

As I understand it, the 'connect' parameter which gets passed to pppd can be any
command which brings up the modem line, logs in, starts ppp negotiation at their
end and then exits. Thus  you could use a chat script, a shell script which
employs expect commands, or indeed a dip script.

It may need a little modification though; standard input is reserved for modem
responses and host prompts; standard output is reserved for modem commands and
responses to the host. Diald itself connects the stdin and stdout file
descriptors to the modem. Therefore you'll need to specifically redirect any
informational status messages generated by the script itself. A suitable bash
shell function (taken from the connect script in the dald rpm provided by SuSE)
would be:

    # Pass a message on to diald and the system logs.
        function message () {
            [ $FIFO ] && echo "message $*" >$FIFO
            logger -p local0.info -t "connect" "$*"
        }
    .
    .
    .
    [ $STATUS -eq $TIMEOUT_STATUS ] && message "Connect timed out"

Where I've defined the syslog message class 'local0' in my /etc/syslog.conf as
follows:

    #
    # ralph's additions:
    #
    local0.*                        /dev/console

this will output these messages to the X console, as well as (by default) to the
main system message log file.


Ralph

--
[EMAIL PROTECTED]        Ralph Clark, Virgo Solutions Ltd (UK)
   __   _
  / /  (_)__  __ ____  __    * Powerful * Flexible * Compatible * Reliable *
 / /__/ / _ \/ // /\ \/ /  *Well Supported * Thousands of New Users Every Day*
/____/_/_//_/\_,_/ /_/\_\    The Cost Effective Choice - Linux Means Business!


-
To unsubscribe from this list: send the line "unsubscribe linux-diald" in
the body of a message to [EMAIL PROTECTED]

Reply via email to