Alex Shnitman wrote:
> As to your first suggestion, maybe there's even a better way -- have
> licq install signal handlers for e.g. SIGUSR1 and SIGUSR2, switching
> it online in the former and offline in the latter, and then have the
> ip-up script killall -USR1 licq and the ip-down script killall -USR2
> licq. It should be pretty easy to implement, and although it won't be
> very robust, it'll work.
>
nimrodm:~$ cat /etc/ppp/ip-up.local
#!/bin/sh
echo 'status online' >/home/nimrodm/.licq/licq_fifo
nimrodm:~$
nimrodm:~$ cat /etc/ppp/ip-down.local
#!/bin/sh
echo 'status offline' >/home/nimrodm/.licq/licq_fifo
nimrodm:~$
That's how it's done for Licq ($HOME/.licq/licq_fifo is a named pipe).
As for having the kernel notify the process about a NETDEV_UP and
NETDEV_DOWN events - I don't think Linux can do that (at leat not kernel
2.2) but it might be worth posting to the kernel mailing list
([EMAIL PROTECTED]). Might be a worthy addition to raw
packet(4) sockets.
-- Nimrod.
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]