> Hi Joseph --
> On Thu, 27 Jan 2000, Joseph Morrison wrote:
>
> > Hello all,
> >
> > Can any of you suggest the cleanest way for a shell script to test
> > whether the diald connection is up or down?
>
> Here is a script I use to do that:
> #!/bin/sh
> if ( /sbin/ifconfig | grep -q ppp0 ); then
> echo "Connected on line."
> else
> echo "On line not connected."
> fi
>
> Hope that helps.
> Chuck.
> My Web site is http://www.mhonline.net/~chuckh
> Due to a shortage of devoted followers, the production of
> great leaders
> has been discontinued.

While this works in *most* situations, it does not work in *all*
situations.  Consider my case, where I have a ppp connection to
a remote subnet and sometimes will have a ppp connection to a
remote user.  In these cases the diald controlled link may not
be ppp0.  It all depends on which ppp interface is brought up
first - diald or one of the others.

--dwh

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Dale W Hodge * [EMAIL PROTECTED] * [EMAIL PROTECTED] * [EMAIL PROTECTED]
             -- www.neuralmatrix.org * www.dnd-automotive.com --
        -= Visit the Aclug Companion http://aclug.neuralmatrix.org =-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


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

Reply via email to