]> git.ipfire.org Git - network.git/blobdiff - network
Introduce enable/disable option for network zones.
[network.git] / network
diff --git a/network b/network
index 00a4f76d747a25fd871a24df1268b51e40cf599a..f3418d8976fe7a1b947e974a9b55e2564c64edde 100755 (executable)
--- a/network
+++ b/network
@@ -35,6 +35,9 @@ done
 
 . /usr/lib/network/functions
 
+# Read network configuration.
+network_config_read
+
 function cli_config() {
        if cli_help_requested $@; then
                cli_show_man network-config
@@ -479,7 +482,7 @@ function cli_zone() {
                esac
 
                case "${action}" in
-                       config|down|edit|port|status|up)
+                       config|disable|down|edit|enable|port|status|up)
                                zone_${action} ${zone} $@
                                ;;
                        *)
@@ -1036,16 +1039,16 @@ function cli_help() {
        hook_exec ${type} ${what} help
 }
 
-function cli_dns() {
+function cli_dns_server() {
        if cli_help_requested $@; then
-               cli_show_man network-dns
+               cli_show_man network-dns-server
                exit ${EXIT_OK}
        fi
 
        # Get the command.
        local cmd=${1}; shift
        if [ -z "${cmd}" ]; then
-               cli_show_man network-dns
+               cli_show_man network-dns-server
                exit ${EXIT_ERROR}
        fi
 
@@ -1097,7 +1100,7 @@ case "${action}" in
                init_run
                ;;
 
-       config|hostname|port|device|zone|start|stop|restart|status|reset|dns|route)
+       config|hostname|port|device|zone|start|stop|restart|status|reset|route)
                cli_${action} $@
                ;;
 
@@ -1106,6 +1109,11 @@ case "${action}" in
                cli_dhcpd ${action/dhcp/ip} $@
                ;;
 
+       # DNS server configuration.
+       dns-server)
+               cli_dns_server $@
+               ;;
+
        ""|help|--help|-h)
                cli_help $@
                ;;