On Wed, 1 Sep 2010 11:57:46 +0200 sven falempin <sven.falem...@gmail.com> wrote:
> ( gmail shorcut :( ) > > to update a file with status of interfaces. it looks like a 'hack'. > > So ifstated is event driven (and monitor changes), how should my script > check the current state of an interfaces ? without parsing the output of > ifconfig who often changes. > > regards. > > 2010/9/1 sven falempin <sven.falem...@gmail.com> > > > Hello, > > > > I am looking for a simple way to check interfaces states, I just read > > ifconfig, netstat and ifstated manpages. > > So i may use ifstated to upda > Don't really know what your asking. You can setup a ifstated loop, there are examples on the net and in ifstated.conf Or If immediate action isn't required or wanted after an unknown event, you could just use. ifconfig fxp0 || do something (e.g. ifconfig fxp0 create or /bin/sh netstart) ifconfig fxp0 && do something/nothing ifconfig fxp0 | grep UP && do something/nothing ifconfig fxp0 | grep UP || do something (e.g ifconfig fxp0 up)