Gustav -
I have seen people use
ifconfig ppp0
to tell if the interface is up. It will also give you the ip address if it
changes. There may also be a file in the /var or /proc trees somewhere I
just don't know. The ifconfig will run anywhere without having to modify
any other config scripts.
something like
if ( ifconfig ppp0 ) then
...
fi
should work. Not sure how elegant it is and there is probably something
better, but maybe this will get you going down the trail a little.
Bret
Gustav Schaffter wrote:
> Hi,
>
> I know I've seen a recipe for this somewhere sometime.
>
> I want to let cron execute a script on regular intervals. This script
> shall look upon the state of my serial port ppp0. If ppp0 is up, then
> certain commands should be executed, otherwise not.
>
> I know that I could use ip-up and ip-down to write some 'indicator file'
> that I can let my new script read and interpret.
>
> But...
>
> I have seen a very elegant solution described (unfortunately I can't
> find it back) where the script looked upon something in the system to
> find out the state of ppp0. May eventually have been something under
> /dev but I really don't remember.
>
> Anyone understand what I'm talking about? ;-)
>
> Anyone have any ideas of how to realize this?
>
> Best regards
> Gustav
>
> --
> pgp = Pretty Good Privacy.
>
> To get my public pgp key, send an e-mail to: [EMAIL PROTECTED]
>
> Visit my web site at http://www.schaffter.com
>
> --
> To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
> as the Subject.
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.