speed.cgi: Suppress error messages if not connected to the internet.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 7 Sep 2013 14:23:50 +0000 (16:23 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 7 Sep 2013 14:23:50 +0000 (16:23 +0200)
config/rootfiles/core/fifteen/filelists/files
html/cgi-bin/speed.cgi

index 2d4ff42bf935f5c464709384e79c28b3cc980301..1ed4113d5a22ce7bb14aab5a10c3401e9aa11b24 100644 (file)
@@ -4,6 +4,7 @@ etc/rc.d/init.d/network
 srv/web/ipfire/cgi-bin/index.cgi
 srv/web/ipfire/cgi-bin/ovpnmain.cgi
 srv/web/ipfire/cgi-bin/upnp.cgi
+srv/web/ipfire/cgi-bin/speed.cgi
 srv/web/ipfire/cgi-bin/vpnmain.cgi
 var/ipfire/backup/bin/backup.pl
 var/ipfire/backup/exclude
index b714d679cf4fa0fea72d6e0ad881499d5100af03..4468abd900804ba60d0388124cb877b6b07a3025 100644 (file)
@@ -36,9 +36,8 @@ foreach $field (@fields) {
        }
 }
 
-
-my $interface = `cat /var/ipfire/red/iface`;
-my @data_now = `ip -s link show $interface`;
+my $interface = `cat /var/ipfire/red/iface 2>/dev/null`;
+my @data_now = `ip -s link show $interface 2>/dev/null`;
 
 my $lastline;
 my $rxb_now = 0;