This project is archived. Its data is read-only.

auto removal of bwauthority.cfg file causes bwauthority to fail to run

Due to a minor change in the NetworkScanners/BwAuthority/run_scan.sh the bwauthority cannot be run because the necessary configuration files are removed.

This line:

find data/scanner.* -name .svn -prune -o -type f -a ! -name '*-done-*' -exec rm {} +

introduced in 5ccc8b14 will remove all the files from data/scanner.*, which includes the bwauthority.cfg file. When that file is removed, the bwauthority scripts will get into a tight loop and spit python traceback errors in the log for each scanner about:

NoSectionError: No section: 'TorCtl'

that is because the config files don't exist, and because they don't exist, there is no [TorCtl] section in the configs.

The fix is pretty simple:

diff --git a/NetworkScanners/BwAuthority/run_scan.sh b/NetworkScanners/BwAuthority/run_scan.sh
index cb32da9..de11226 100755
--- a/NetworkScanners/BwAuthority/run_scan.sh
+++ b/NetworkScanners/BwAuthority/run_scan.sh
@@ -33,7 +33,7 @@ sleep 5
 
 # FIXME: We resume in a ghetto way by saving the bws-*done* files.
 # A more accurate resume could be implemented in bwauthority.py
-find data/scanner.* -name .svn -prune -o -type f -a ! -name '*-done-*' -exec rm {} +
+find data/scanner.* -name .svn -prune -o -type f -a ! -name '*-done-*' -a ! -name bwauthority.cfg -exec rm {} +
 
 rm -f ./data/tor/tor.log
Assignee Loading
Time tracking Loading