Funkcija vraca IP netmask mreznog sucelja. U slucaju da nije
naveden kao argument, vraca IP netmask od loopback sucelja (lo).
-cp_get_cidr <interface>
+cp_get_netaddr <interface>
Funkcija vraca podmrezu mreznog sucelja u CIDR obliku. U slucaju
da nije naveden <interface> argument, vraca CIDR sucelja preko
Package: carnet-tools-cn
Architecture: all
-Depends: perl, coreutils, debianutils, gawk, ipcalc, net-tools
+Depends: perl, coreutils, debianutils, awk, ipcalc, net-tools
Description: CARNet tools for Debian packaging
CARNet tools for Debian packaging. Include:
- functions.sh
}
# by ico, Tue, 15 Mar 2005 14:04:21 +0100
-cp_get_cidr() {
+cp_get_netaddr() {
[ "$CP_SCRIPT_DEBUG" ] && set -vx
local netmask ipaddress interface cidr echo_return
echo_return="$CP_ECHO_RETURN" # since we're making our own calls
fi
if ! ifconfig $interface 2> /dev/null >> /dev/null; then
- [ "$CP_VERBOSE" ] || echo "cp_get_cidr: $interface: No such interface"
+ [ "$CP_VERBOSE" ] || echo "cp_get_netaddr: $interface: No such interface"
goto return1
fi
cp_get_ifaddr "$interface"
ipaddress="$RET"
if [ -z $ipaddress ]; then
- [ "$CP_VERBOSE" ] || echo "cp_get_cidr: $interface: No such ipaddress"
+ [ "$CP_VERBOSE" ] || echo "cp_get_netaddr: $interface: No such ipaddress"
goto return1
fi
cp_get_ifmask "$interface"
netmask="$RET"
if [ -z $netmask ]; then
- [ "$CP_VERBOSE" ] || echo "cp_get_cidr: $interface: No such netmask"
+ [ "$CP_VERBOSE" ] || echo "cp_get_netaddr: $interface: No such netmask"
fi
if [ "$netmask" = "255.255.255.255" ]; then
# by ico, Tue, 15 Mar 2005 14:04:21 +0100
cp_backup_conffile() {
- [ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx
+ [ "$CP_SCRIPT_DEBUG" ] && set -vx
local file_bak
if [ -z $1 ]; then