+carnet-tools-cn (2.5.1) sarge; urgency=low
+
+ * Ignoriranje visestrukih default route.
+
+ -- Zoran Dzelajlija <jelly@srce.hr> Sun, 25 Dec 2005 00:32:52 +0100
+
carnet-tools-cn (2.5) sarge; urgency=low
* Dodane -n, -p i -d <backup_dir> opcije za cp_backup_conffile.
RET=""
case $1 in
- dev) RET=`route -n | awk '/^0.0.0.0/{print $8}'` ;;
- addr) RET=`route -n | awk '/^0.0.0.0/{print $2}'` ;;
+ dev) RET=`route -n | \
+ awk 'BEGIN {m = 2^32}
+ /^0.0.0.0\b/{if ($5 < m) {r = $8; m = $5}}
+ END {print r}'`
+ addr) RET=`route -n | \
+ awk 'BEGIN {m = 2^32}
+ /^0.0.0.0\b/{if ($5 < m) {r = $2; m = $5}}
+ END {print r}'`
*) echo "cp_get_ifdefault: Argument required (dev or addr)" >&2 ;;
esac