mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-24 03:01:01 +01:00
Fix bug in ip-in-use test
Need grep -wF instead of grep -w for IP test to avoid spurious match against broadcast address in ifconfig output.
This commit is contained in:
@@ -68,7 +68,7 @@ validate_ip() {
|
||||
error_exit "Invalid: (${TEST_IP})"
|
||||
fi
|
||||
done
|
||||
if ifconfig | grep -qw "${TEST_IP}"; then
|
||||
if ifconfig | grep -qwF "${TEST_IP}"; then
|
||||
warn "Warning: IP address already in use (${TEST_IP})."
|
||||
else
|
||||
info "Valid: (${IP})."
|
||||
|
||||
Reference in New Issue
Block a user