[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Interface status detection
On Mon, Dec 20, 1999 at 11:47:14PM +0200, Nimrod Mesika 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).
Neat! I didn't know that. Just goes to show how you need to RTFM
before you set out to write code. :-)
--
Alex Shnitman | http://www.debian.org
alexsh@hectic.net, alexsh@linux.org.il +-----------------------
http://alexsh.hectic.net UIN 188956 PGP key on web page
E1 F2 7B 6C A0 31 80 28 63 B8 02 BA 65 C7 8B BA
Software suppliers are trying to make their software packages more
"user-friendly". ... Their best approach, so far, has been to take all
the old brochures, and stamp the words, "user-friendly" on the cover.
-- Bill Gates, Microsoft, Inc.
PGP signature