From f97144259335102c3d96b232cbb0af4970120d62 Mon Sep 17 00:00:00 2001 From: sarthurdev <965089+sarthurdev@users.noreply.github.com> Date: Mon, 10 Jan 2022 23:24:50 +0100 Subject: validators: T4144: Add error messages to the majority of IP validators --- src/validators/ipv4-host | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/validators/ipv4-host') diff --git a/src/validators/ipv4-host b/src/validators/ipv4-host index f42feffa4..74b8c36a7 100755 --- a/src/validators/ipv4-host +++ b/src/validators/ipv4-host @@ -1,3 +1,10 @@ #!/bin/sh ipaddrcheck --is-ipv4-host $1 + +if [ $? -gt 0 ]; then + echo "Error: $1 is not a valid IPv4 host" + exit 1 +fi + +exit 0 \ No newline at end of file -- cgit v1.2.3