Skip to content

Commit

Permalink
fix /proc/net/dev scan
Browse files Browse the repository at this point in the history
  • Loading branch information
darkxst committed Jul 22, 2012
1 parent 3117df5 commit 21f7cce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion [email protected]/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ const Net = new Lang.Class({

if(!this.ifs.length){
let net_lines = Shell.get_file_contents_utf8_sync('/proc/net/dev').split("\n");
for(let i = 3; i < net_lines.length - 1 ; i++) {
for(let i = 2; i < net_lines.length - 1 ; i++) {
let ifc = net_lines[i].replace(/^\s+/g, '').split(":")[0];
if(Shell.get_file_contents_utf8_sync('/sys/class/net/' + ifc + '/operstate')
.replace(/\s/g, "") == "up" &&
Expand Down

0 comments on commit 21f7cce

Please sign in to comment.