]> git.ipfire.org Git - people/stevee/network.git/blobdiff - src/network
bash-completion: Add some basic completion for DHCP servers
[people/stevee/network.git] / src / network
index 01b43fcfa4be63a258cee9df257ac7b34cb65da5..867e3a8b433aa957cc7d77b2a829969890366f48 100644 (file)
@@ -996,7 +996,7 @@ function cli_dhcpd_subnet_show() {
                cli_headline $(( ${level} + 2 )) "Options"
 
                local option
-               for option in $(dhcpd_subnet_options ${proto}); do
+               for option in $(dhcpd_subnet_options_list ${proto}); do
                        [ -n "${options[${option}]}" ] || continue
 
                        cli_print_fmt1 $(( ${level} + 2 )) \
@@ -1024,7 +1024,7 @@ function cli_dhcpd_subnet_show() {
        cli_space
 }
 
-function cli_dhcpd_options() {
+function cli_dhcpd_subnet_options() {
        local proto=${1}
        assert isset proto
        shift
@@ -1033,8 +1033,6 @@ function cli_dhcpd_options() {
        assert isset subnet_id
        shift
 
-       local valid_options=$(dhcpd_subnet_options ${proto})
-
        local key val
        while [ $# -gt 0 ]; do
                case "${1}" in
@@ -1253,6 +1251,18 @@ function cli_raw() {
                list-devices)
                        device_list
                        ;;
+               list-dhcpd-ranges-of-subnet)
+                       dhcpd_subnet_range_list $@
+                       ;;
+               list-dhcpd-settings)
+                       dhcpd_global_settings_list $@
+                       ;;
+               list-dhcpd-subnets)
+                       dhcpd_subnet_list $@
+                       ;;
+               list-dhcpd-subnet-options)
+                       dhcpd_subnet_options_list $@
+                       ;;
                list-dns-servers)
                        dns_server_list
                        ;;