Re: a question about pppd
Incoming from Shu Hung (Koala):
> s. keeling ??:
>
> | Incoming from Shu Hung (Koala):
> |
> |> I want my perl script to check if the pppd is on
> |>
> |> how can I do that? is there any function to check so? or does the
> |> pppd lock any file for me to check so?
> |
> |
> | /sbin/ifconfig
> |
> | /var/lock/LCK..ttyS[0-?]
-----------------------------------------
(0) keeling /home/keeling_ ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
[snip]
ppp0 Link encap:Point-to-Point Protocol
inet addr:209.115.174.101 P-t-P:209.115.174.1 Mask:255.255.255.255
[snip
-----------------------------------------
(0) keeling /home/keeling_ if [ -f /var/lock/LCK..ttyS0 ]; then
> echo woohoo!
> fi
woohoo!
--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://www.spots.ab.ca/~keeling
- -
Reply to: