done | sort -u
}
+function cli_route() {
+ if cli_help_requested $@; then
+ cli_show_man network-route
+ exit ${EXIT_OK}
+ fi
+
+ local action=${1}
+ shift
+
+ case "${action}" in
+ # Add a new route.
+ add)
+ route_add $@
+ ;;
+ # Remove an existing route.
+ remove)
+ route_remove $@
+ ;;
+ # List all routes.
+ list)
+ route_list $@
+ ;;
+ *)
+ error "Unrecognized action: ${action}"
+ cli_run_help network route
+
+ exit ${EXIT_ERROR}
+ ;;
+ esac
+
+ exit ${EXIT_OK}
+}
+
function cli_start() {
if cli_help_requested $@; then
cli_show_man network
init_run
;;
- config|hostname|port|device|zone|start|stop|restart|status|reset|dns)
+ config|hostname|port|device|zone|start|stop|restart|status|reset|dns|route)
cli_${action} $@
;;