retrieving mac address on non-english locale fails

Bug #790352 reported by Patrick Brueckner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Net Responsibility
New
Undecided
Unassigned

Bug Description

net responsibility uses ifconfig to get mac-address for interfaces.
when used on a non-english locale, grep fails, since it doesn't find the required keyword (HWAddr).

Forcing the command to run with the english locale fixes this problem.

Revision history for this message
Patrick Brueckner (madmuffin) wrote :
Revision history for this message
Roggan (roggan87) wrote :

Thanks Patrick! Finally this bug is solved.

For you who didn't follow:
Open /usr/share/net-responsibility/lib/options.rb as root to edit. Find this line:
IO.popen("ifconfig -a | grep HWaddr | cut -c39-") do |mac_addr|

Replace it with this line:
IO.popen("LC_ALL=en_EN ifconfig -a | grep HWaddr | cut -c39-") do |mac_addr|

That should do the trick.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.