summaryrefslogtreecommitdiffstats
path: root/lib/net.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net.sh')
-rw-r--r--lib/net.sh9
1 files changed, 0 insertions, 9 deletions
diff --git a/lib/net.sh b/lib/net.sh
deleted file mode 100644
index 518c955b6..000000000
--- a/lib/net.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-net_netmask_to_prefix() {(
- binaryNetmask=$(echo $1 | sed 's/^/obase=2;/;s/\./;/g' | bc | tr -d \\n)
- binaryPrefix=$(echo $binaryNetmask | sed -n 's/^\(1*\)0*$/\1/p')
- if ! echo $binaryPrefix | grep -q .; then
- echo $0: bad netmask: $netmask >&2
- exit 4
- fi
- printf %s $binaryPrefix | tr -d 0 | wc -c
-)}