Allow whitespace in routing commands, Gentoo bug #200458.

This commit is contained in:
Roy Marples 2007-11-28 10:04:15 +00:00
parent f6033cfb26
commit 8a328b7408

View File

@ -561,16 +561,12 @@ ${routes}"
eindent
ebegin ${cmd}
# Work out if we're a host or a net if not told
case "${cmd}" in
case ${cmd} in
*" -net "*|*" -host "*) ;;
*" netmask "*) cmd="-net ${cmd}" ;;
*)
case "${cmd%% *}" in
*.*.*.*/32) cmd="-host ${cmd}" ;;
*.*.*.*/*|0.0.0.0|default) cmd="-net ${cmd}" ;;
*) cmd="-host ${cmd}" ;;
esac
;;
*" netmask "*) cmd="-net ${cmd}" ;;
*.*.*.*/32) cmd="-host ${cmd}" ;;
*.*.*.*/*|0.0.0.0|default) cmd="-net ${cmd}" ;;
*) cmd="-host ${cmd}" ;;
esac
if ${hidefirstroute} ; then
_add_route ${cmd} >/dev/null 2>/dev/null