2010/9/1 sven falempin <sven.falem...@gmail.com> > @michal - I don't want to regularly launch a command: i'm looking for a > command that answer interface status. Like the ifconfig status. > @chadwick - Yes the ifconfig output may be parsed but it may change, (for > example the trunk interfaces output has change recently). > <<ifconfig fxp0 | grep UP && do something/nothing>> is what i need. > > Nevertheless, i look for a better solution because the UP keyword is not > documented, because there is also RUNNING and because i don't want to > rewrite a interface status checker each time ifconfig output is changed !-) > > > 2010/9/1 Kevin Chadwick <ma1l1i...@yahoo.co.uk> > > 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) >> >> > > > -- > No doubt it is one of the functions of art to replace religious faith by > the effective ingredient of beauty. At least beauty must have the power of a > poem, that is to say of a crime. >
-- No doubt it is one of the functions of art to replace religious faith by the effective ingredient of beauty. At least beauty must have the power of a poem, that is to say of a crime.