aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2019-06-26 14:55:44 +1000
committeronefang2019-06-26 14:55:44 +1000
commit6946c7fa2eab182f52429951dab475eff1fe96bf (patch)
treee7e904ccddac64a521b464dd08060e08e797469e
parentChange how the / at the end of the path is handled. (diff)
downloadapt-panopticon-6946c7fa2eab182f52429951dab475eff1fe96bf.zip
apt-panopticon-6946c7fa2eab182f52429951dab475eff1fe96bf.tar.gz
apt-panopticon-6946c7fa2eab182f52429951dab475eff1fe96bf.tar.bz2
apt-panopticon-6946c7fa2eab182f52429951dab475eff1fe96bf.tar.xz
Log file failure should exit, and another tweak.
-rwxr-xr-xmirror-checker.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/mirror-checker.lua b/mirror-checker.lua
index eb82a32..142c5e3 100755
--- a/mirror-checker.lua
+++ b/mirror-checker.lua
@@ -417,8 +417,8 @@ if 0 < #arg then
417 else 417 else
418 logFile, e = io.open("results/mirror-checker-lua_" .. pu.host .. ".log", "a+") 418 logFile, e = io.open("results/mirror-checker-lua_" .. pu.host .. ".log", "a+")
419 end 419 end
420 if nil == logFile then C("opening log file - " .. e) end 420 if nil == logFile then C("opening log file - " .. e); return end
421 I("Starting tests for " ..pu.host .. " with these tests - " .. table.concat(options.tests.value, ", ")) 421 I("Starting tests for " ..arg[1] .. " with these tests - " .. table.concat(options.tests.value, ", "))
422 if nil ~= arg[2] then I(" Using IP " .. arg[2]) end 422 if nil ~= arg[2] then I(" Using IP " .. arg[2]) end
423 if testing("Integrity") or testing("Updated") then 423 if testing("Integrity") or testing("Updated") then
424 if not keep then execute("rm -fr results/" .. pu.host) end 424 if not keep then execute("rm -fr results/" .. pu.host) end
@@ -430,12 +430,12 @@ if 0 < #arg then
430 checkExes("mirror-checker.lua " .. sendArgs) 430 checkExes("mirror-checker.lua " .. sendArgs)
431 checkExes(downloadLock) 431 checkExes(downloadLock)
432 end 432 end
433 checkHost(pu.host, pu.path, arg[2]) 433 checkHost(pu.host, pu.host, pu.path, arg[2])
434 logFile:close() 434 logFile:close()
435else 435else
436 if not keep then os.execute("rm -f results/*.log") end 436 if not keep then os.execute("rm -f results/*.log") end
437 logFile, e = io.open("results/mirror-checker-lua.log", "a+") 437 logFile, e = io.open("results/mirror-checker-lua.log", "a+")
438 if nil == logFile then C("opening log file - " .. e) end 438 if nil == logFile then C("opening log file - " .. e); return end
439 I("Starting tests " .. table.concat(options.tests.value, ", ")) 439 I("Starting tests " .. table.concat(options.tests.value, ", "))
440 execute("mkdir -p results") 440 execute("mkdir -p results")
441 local mirrors = getMirrors() 441 local mirrors = getMirrors()