summaryrefslogtreecommitdiffstats
path: root/lib/net.sh
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-05-21 01:56:08 +0200
committertv <tv@shackspace.de>2015-05-21 01:56:08 +0200
commit36670f3e1cccad579b994a29320eeb8e287803b7 (patch)
tree484cb2c1075cdcabe8020ca40704f4d68f2b2fed /lib/net.sh
parentb95a514bcced00af77ae4adab77326dba9ab4c36 (diff)
sh: functions -> bin/
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
-)}