Fix noprop flag detection (#284)

This commit is contained in:
Tim Wilkinson 2022-03-11 14:01:02 -08:00 committed by GitHub
parent 8409ffe6ea
commit d9c2bb1bee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -107,8 +107,8 @@ if dmz_mode ~= "0" then
if nixio.fs.stat("/etc/ethers") then
for line in io.lines("/etc/ethers")
do
local noprop = line:match(".* .*( .*)")
if noprop ~= " #NOPROP" then
local noprop = line:match(".*%s+.*%s+#NOPROP")
if not noprop then
local ip = line:match("[0-9a-fA-F:]+%s+([%d%.]+)")
if ip then
local host = ip_to_hostname(ip)