]> git.ipfire.org Git - people/stevee/network.git/blobdiff - firewall
Move config functions into seperate file.
[people/stevee/network.git] / firewall
index ca4d16cc0640448e4f798416010364d868f510d0..5b49ed14128306e90b74e92f1579314cb155562a 100755 (executable)
--- a/firewall
+++ b/firewall
@@ -29,6 +29,20 @@ function cli_stop() {
        firewall_stop
 }
 
+function cli_config() {
+       if cli_help_requested $@; then
+               cli_usage root-config
+               exit ${EXIT_OK}
+       fi
+
+       if [ -n "${1}" ]; then
+               config_set $@
+               firewall_config_write
+       else
+               firewall_config_print
+       fi
+}
+
 # Parse the command line
 while [ $# -gt 0 ]; do
        case "${1}" in
@@ -54,6 +68,10 @@ case "${action}" in
                cli_stop $@
                ;;
 
+       config)
+               cli_config $@
+               ;;
+
        ""|help|--help|-h)
                cli_usage root
                exit ${EXIT_OK}