summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-05-20 22:21:45 +0200
committertv <tv@shackspace.de>2015-05-20 22:21:45 +0200
commitee82c6df3a43c73f44f3af2125ed5e21a408061c (patch)
treeb6014a15b2cac8b35f44e116bfb701345ae3c95e
parentc5b8e0d368939a790c2fbb09e553394eef94a705 (diff)
infest: rm netmaskToPrefixLengh
-rwxr-xr-xinfest15
1 files changed, 0 insertions, 15 deletions
diff --git a/infest b/infest
index 2c02b13c2..ca37f49ec 100755
--- a/infest
+++ b/infest
@@ -43,10 +43,6 @@ main() {
infest_centos7_64bit() {
server=$1
address=$(echo $server | jq -r .ip)
- gateway=$(echo $server | jq -r .gateway)
- nameserver=8.8.8.8
- netmask=$(echo $server | jq -r .netmask)
- prefixLength=$(netmaskToPrefixLengh $netmask)
RSYNC_RSH='sshpass -e ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
SSHPASS=$(echo $server | jq -r .rootpass)
export SSHPASS
@@ -188,15 +184,4 @@ infest_centos7_64bit() {
/bin/sh
}
-netmaskToPrefixLengh() {
- 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
-}
-
-
main "$@"