405 |
|
|
406 |
# only add and del are allowed |
# only add and del are allowed |
407 |
case ${method} in |
case ${method} in |
408 |
add) message="Adding route ${COLBLUE}${route}${COLDEFAULT} ..." ;; |
add) message="Adding" ;; |
409 |
del) message="Removing route ${COLBLUE}${route}${COLDEFAULT} ..." ;; |
del) message="Removing" ;; |
410 |
*) |
*) |
411 |
rc_echo "config_routes: unsupported \$method '${method}'." |
rc_echo "config_routes: unsupported \$method '${method}'." |
412 |
exit 1 |
exit 1 |
422 |
case "${route}" in |
case "${route}" in |
423 |
\#*|"") continue ;; |
\#*|"") continue ;; |
424 |
esac |
esac |
425 |
rc_print "${message}" |
rc_print "${message} route ${COLBLUE}${route}${COLDEFAULT} ..." |
426 |
route "${method}" "${route}" |
# do not esacpe ${route} or it breaks! |
427 |
|
route "${method}" ${route} |
428 |
evaluate_retval |
evaluate_retval |
429 |
done |
done |
430 |
fi |
fi |