X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=src%2Fnetwork;h=288f4beddb9d89095a39e8f0a417651aae055578;hb=2da98f56d47fa889b33d57d4f0c8b4c14ac9fc7c;hp=4d5955fa78c408a7f33566d76f341443df8db7de;hpb=240367bad6260d3f7976649a204000daf09d9257;p=people%2Fms%2Fnetwork.git diff --git a/src/network b/src/network index 4d5955fa..288f4bed 100644 --- a/src/network +++ b/src/network @@ -175,8 +175,15 @@ cli_device_status() { device_is_promisc ${device} &>/dev/null cli_print_fmt1 1 "Promisc" "$(cli_print_bool $?)" + + # Supports multiqueue? + if device_supports_multiqueue ${device}; then + cli_print_fmt 1 "Multiqueue" "Supported" + fi cli_space + cli_device_show_queues 2 ${device} + # Print all vlan devices. local vlans=$(device_get_vlans ${device}) if [ -n "${vlans}" ]; then @@ -511,6 +518,12 @@ cli_port() { edit|create|remove|up|down|status|identify) port_${action} "${port}" $@ ;; + color) + color_cli "port" "${port}" $@ + ;; + description) + description_cli "port" "${port}" $@ + ;; *) error "Unrecognized argument: ${action}" exit ${EXIT_ERROR} @@ -541,7 +554,7 @@ cli_zone() { local action local zone - if zone_name_is_valid ${1}; then + if zone_exists ${1}; then zone=${1} action=${2} shift 2 @@ -569,6 +582,12 @@ cli_zone() { config|disable|down|edit|enable|identify|status|up) zone_${action} ${zone} $@ ;; + color) + color_cli "zone" "${zone}" $@ + ;; + description) + description_cli "zone" ${zone} $@ + ;; *) error "Unrecognized argument: ${action}" cli_show_man network-zone @@ -742,73 +761,6 @@ cli_list_hooks() { done | sort -u } -cli_route() { - if cli_help_requested $@; then - cli_show_man network-route - exit ${EXIT_OK} - fi - - local action=${1} - shift - - case "${action}" in - static) - cli_route_static $@ - ;; - *) - error "Unrecognized action: ${action}" - cli_run_help network route - - exit ${EXIT_ERROR} - ;; - esac - - exit ${EXIT_OK} - - -} - -cli_route_static() { - if cli_help_requested $@; then - cli_show_man network-route-static - 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 $@ - return ${EXIT_OK} - ;; - # Reload all routes. - reload) - route_apply $@ - ;; - *) - error "Unrecognized action: ${action}" - cli_run_help network route - - exit ${EXIT_ERROR} - ;; - esac - - # Applying all routes. - route_apply - - exit ${EXIT_OK} -} - cli_dhcpd() { local proto=${1} shift @@ -827,9 +779,15 @@ cli_dhcpd() { ;; start) dhcpd_start ${proto} + + # Make this permanent + dhcpd_enable ${proto} ;; stop) dhcpd_stop ${proto} + + # Make this permanent + dhcpd_disable ${proto} ;; restart|reload) dhcpd_reload ${proto} @@ -1175,7 +1133,6 @@ cli_reset() { fi warning_log "Will reset the whole network configuration!!!" - # Force mode is disabled by default local force=0 @@ -1350,6 +1307,24 @@ cli_raw() { list-zones) zones_get_all ;; + list-next-free-zones) + zones_get_next_free + ;; + list-zone-config-ids) + zone_config_list_ids $@ + ;; + list-zone-config-hids) + zone_config_list_hids $@ + ;; + zone-name-is-valid) + zone_name_is_valid $@ + ;; + zone-config-id-is-valid) + zone_config_id_is_valid $@ + ;; + zone-config-hid-is-valid) + zone_config_hid_is_valid $@ + ;; *) error "No such command: ${cmd}" exit ${EXIT_ERROR} @@ -1365,7 +1340,7 @@ case "${action}" in init_run ;; - settings|hostname|port|device|zone|start|stop|restart|status|reset|route) + settings|hostname|port|device|zone|start|stop|restart|status|reset|route|vpn) cli_${action} $@ ;;