Browse Source

Fix static analysis warnings

Bob Mottram 6 years ago
parent
commit
bf0b31aa7f
1 changed files with 29 additions and 29 deletions
  1. 29
    29
      src/freedombone-utils-firewall

+ 29
- 29
src/freedombone-utils-firewall View File

@@ -54,10 +54,10 @@ function block_firefox_telemetry {
54 54
     # Within firefox source code see submit_telemetry_data.py
55 55
 
56 56
     if ! grep -q 'telemetry.mozilla' /etc/hosts; then
57
-	echo '127.0.0.1  telemetry.mozilla.org' >> /etc/hosts
58
-	echo '127.0.0.1  incoming.telemetry.mozilla.org' >> /etc/hosts
57
+    echo '127.0.0.1  telemetry.mozilla.org' >> /etc/hosts
58
+    echo '127.0.0.1  incoming.telemetry.mozilla.org' >> /etc/hosts
59 59
     fi
60
-        
60
+
61 61
     if grep -q "$FIREFOX_TELEMETRY_IP" /etc/firewall.conf; then
62 62
         return
63 63
     fi
@@ -360,32 +360,32 @@ function mesh_firewall {
360 360
     FIREWALL_FILENAME="${rootdir}/etc/systemd/system/meshfirewall.service"
361 361
     MESH_FIREWALL_SCRIPT=${rootdir}/usr/bin/mesh-firewall
362 362
 
363
-    if ! grep -q 'telemetry.mozilla' ${rootdir}/etc/hosts; then
364
-	echo '127.0.0.1       telemetry.mozilla.org' >> ${rootdir}/etc/hosts
365
-	echo '127.0.0.1       incoming.telemetry.mozilla.org' >> ${rootdir}/etc/hosts
366
-    fi
367
-
368
-    if ! grep -q 'facebook' ${rootdir}/etc/hosts; then
369
-	{ echo '127.0.0.1       www.facebook.com';
370
-	  echo '127.0.0.1       facebook.com';
371
-	  echo '127.0.0.1       static.ak.fbcdn.net';
372
-	  echo '127.0.0.1       www.static.ak.fbcdn.net';
373
-	  echo '127.0.0.1       login.facebook.com';
374
-	  echo '127.0.0.1       www.login.facebook.com';
375
-	  echo '127.0.0.1       fbcdn.net';
376
-	  echo '127.0.0.1       www.fbcdn.net';
377
-	  echo '127.0.0.1       fbcdn.com';
378
-	  echo '127.0.0.1       www.fbcdn.com';
379
-	  echo '127.0.0.1       static.ak.connect.facebook.com';
380
-	  echo '127.0.0.1       www.static.ak.connect.facebook.com'; } >> ${rootdir}/etc/hosts	
381
-    fi
382
-    
383
-    if ! grep -q 'google' ${rootdir}/etc/hosts; then
384
-	{ echo '127.0.0.1       www.google-analytics.com';
385
-	  echo '127.0.0.1       google-analytics.com';
386
-	  echo '127.0.0.1       ssl.google-analytics.com'; } >> ${rootdir}/etc/hosts
387
-    fi    
388
-    
363
+    if ! grep -q 'telemetry.mozilla' "${rootdir}/etc/hosts"; then
364
+    echo '127.0.0.1       telemetry.mozilla.org' >> "${rootdir}/etc/hosts"
365
+    echo '127.0.0.1       incoming.telemetry.mozilla.org' >> "${rootdir}/etc/hosts"
366
+    fi
367
+
368
+    if ! grep -q 'facebook' "${rootdir}/etc/hosts"; then
369
+    { echo '127.0.0.1       www.facebook.com';
370
+      echo '127.0.0.1       facebook.com';
371
+      echo '127.0.0.1       static.ak.fbcdn.net';
372
+      echo '127.0.0.1       www.static.ak.fbcdn.net';
373
+      echo '127.0.0.1       login.facebook.com';
374
+      echo '127.0.0.1       www.login.facebook.com';
375
+      echo '127.0.0.1       fbcdn.net';
376
+      echo '127.0.0.1       www.fbcdn.net';
377
+      echo '127.0.0.1       fbcdn.com';
378
+      echo '127.0.0.1       www.fbcdn.com';
379
+      echo '127.0.0.1       static.ak.connect.facebook.com';
380
+      echo '127.0.0.1       www.static.ak.connect.facebook.com'; } >> "${rootdir}/etc/hosts"
381
+    fi
382
+
383
+    if ! grep -q 'google' "${rootdir}/etc/hosts"; then
384
+    { echo '127.0.0.1       www.google-analytics.com';
385
+      echo '127.0.0.1       google-analytics.com';
386
+      echo '127.0.0.1       ssl.google-analytics.com'; } >> "${rootdir}/etc/hosts"
387
+    fi
388
+
389 389
     { echo '#!/bin/bash';
390 390
       echo 'iptables -P INPUT ACCEPT';
391 391
       echo 'ip6tables -P INPUT ACCEPT';