summaryrefslogtreecommitdiff
path: root/scripts/add_ip
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/add_ip')
-rwxr-xr-xscripts/add_ip2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/add_ip b/scripts/add_ip
index 0d7d87c..e582a49 100755
--- a/scripts/add_ip
+++ b/scripts/add_ip
@@ -5,7 +5,7 @@ if [ x"$2" = x ]; then
fi
cidr="$1"
-hex="$(./scripts/cidr2hex "$cidr")"
+hex=$($(dirname "$0")/cidr2hex "$cidr") || exit 1
dir=db/ip/"$hex"
if [ -e "$dir" ]; then
echo "Refusing to clobber existing record" >&2; exit 1