mask2prefix fix naming convention

This commit is contained in:
gh2o 2014-09-27 20:54:05 -07:00
parent 654e88884c
commit 031c638a80
1 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ log() {
echo "[$(date)]" "$@" >&2
}
mask2prefix() {
mask_to_prefix() {
local prefix=0 netmask=${1}
for octet in ${netmask//./ }; do
for bitmask in 128 64 32 16 8 4 2 1; do
@ -90,7 +90,7 @@ parse_debian_interfaces() {
;;
netmask)
if [ "${args/.}" != "${args}" ]; then
prefix=$(mask2prefix "${args}")
prefix=$(mask_to_prefix "${args}")
else
prefix="${args}"
fi