My problem is not pure networking, but i thought networking section would be more appropriate than ports and packages section.
I need to have one .conkyrc file which would apply to multiple workstations and display their IP address no matter which driver do their NIC use.
It is easy if all of the workstations have the same adapter:
If there are a few it is possible:
This is not so pretty though, because line which does not match active NIC is not skipped, just presented as blank in conky. This way if I list 10 or so common drivers (alc, bge, bce etc.) I get a lot of wasted space in conky. Also, if there are 2 or more NICs with same driver things get more complicated as I need to list also bge1, em1 etc.
So is there a way (by means of scripting perhaps) to get name of active NIC and pass it into conky configuration file?
Thank you in advance.
I need to have one .conkyrc file which would apply to multiple workstations and display their IP address no matter which driver do their NIC use.
It is easy if all of the workstations have the same adapter:
Code:
${addr bge0}
If there are a few it is possible:
Code:
${if_up bge0} ${addr bge0} ${endif}
${if_up em0} ${addr em0} ${endif}
This is not so pretty though, because line which does not match active NIC is not skipped, just presented as blank in conky. This way if I list 10 or so common drivers (alc, bge, bce etc.) I get a lot of wasted space in conky. Also, if there are 2 or more NICs with same driver things get more complicated as I need to list also bge1, em1 etc.
So is there a way (by means of scripting perhaps) to get name of active NIC and pass it into conky configuration file?
Thank you in advance.