From: Ivan Rako Date: Fri, 21 Feb 2020 14:37:28 +0000 (+0100) Subject: Ispravljen bug u functions.sh X-Git-Tag: debian/3.2.2^0 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=refs%2Fheads%2Fstretch;p=carnet-tools-cn.git Ispravljen bug u functions.sh --- diff --git a/debian/changelog b/debian/changelog index a124184..588524c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +carnet-tools-cn (3.2.2) stable; urgency=low + + * Ispravljen bug u functions.sh + + -- Ivan Rako Fri, 21 Feb 2020 15:37:21 +0100 + carnet-tools-cn (3.2.1) stable; urgency=low * Izbacena ovisnost o paketu net-tools, sad se koristi naredba ip diff --git a/functions.sh b/functions.sh index 7f03924..ed67fb0 100644 --- a/functions.sh +++ b/functions.sh @@ -72,7 +72,7 @@ cp_get_ifmask() { #ifmask="`/sbin/ifconfig $interface | awk '/Mask/{if($3~/Mask/)a=$3;else if ($4~/Mask/)a=$4;printf ("%s\n", substr(a,index(a,":")+1))}'`" #ifmask="`/sbin/ifconfig $interface | awk '/netmask /{ printf($4) }'`" cidr="`ip -o -4 addr show $interface scope global | awk '{print $4;}'`" - ifmask="`ipcalc -nb 161.53.0.188/28 | awk '/^Netmask:/{print $2}'`" + ifmask="`ipcalc -nb $cidr | awk '/^Netmask:/{print $2}'`" if [ -z "$ifmask" ]; then echo "cp_get_ifmask: $interface: No netmask found" 1>&2