]> git.ipfire.org Git - people/ms/network.git/blobdiff - src/hooks/ports/ethernet
hooks: Use cli_get_bool convenience function where ever possible
[people/ms/network.git] / src / hooks / ports / ethernet
index 82664fa15376198d712e1fed7267d0025a2d21be..80b550312d5b4e3098cc4763bb891bb03bcf39d1 100644 (file)
@@ -85,16 +85,7 @@ hook_parse_cmdline() {
                                ;;
 
                        --offloading=*)
-                               OFFLOADING="$(cli_get_val "${1}")"
-
-                               if enabled OFFLOADING; then
-                                       OFFLOADING="on"
-                               elif disabled OFFLOADING; then
-                                       OFFLOADING="off"
-                               else
-                                       error "Invalid value for offloading: ${OFFLOADING}"
-                                       return ${EXIT_ERROR}
-                               fi
+                               OFFLOADING="$(cli_get_bool "${1}")"
                                ;;
 
                        *)