TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:18140] dial on demand (ppp) and knowing it



Ben Luey said:
> Is there a better way to see if I'm
> online (I can't to a process check since pppd is loaded with offline)

Simple.  Don't ask pppd.  Instead, check whether you have a default route set
(if (route -n | grep -q UG); then fetchmail) or whether the ppp interface is
active (if (ifconfig ppp0 | grep -q UP); then fetchmail).

-- 
"Two words: Windows survives." - Craig Mundie, Microsoft senior strategist
"So does syphillis. Good thing we have penicillin." - Matthew Alton
Geek Code 3.1:  GCS d- s+: a- C++ UL++$ P+>+++ L++>++++ E- W--(++) N+ o+ !K
w---$ O M- !V PS+ PE Y+ PGP t 5++ X+ R++ tv- b++ DI++++ D G e* h+ r++ y+