On Wed, Oct 06, 2010 at 12:20:31PM +0200, David Bucek wrote: > Hi, > > I made very very simple patch for snort.config file. Detecting status of > network interface is based on sysfs not ifconfig command. I hope it will > be usefull.
Which kernel are you using? I'm not sure this is inmediately useful. In my system (using linux kernel 2.6.32) the 'operstate' value does not return any useful value: $ for i in /sys/class/net/*/operstate; do echo -n "$i: "; cat $i; done /sys/class/net/eth0/operstate: unknown /sys/class/net/eth1/operstate: unknown /sys/class/net/lo/operstate: unknown /sys/class/net/vmnet1/operstate: unknown /sys/class/net/vmnet8/operstate: unknown I could use the 'ip link show' command although its output could be translatable too. Maybe just setting LC_ALL=C before running ifconfig would be enough. Regards Javier
signature.asc
Description: Digital signature