diff options
author | Helmut Grohne <helmut@subdivi.de> | 2025-06-12 22:19:43 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2025-06-12 22:19:43 +0200 |
commit | a7d8ecc4387619f88ff803a0bee79e4a44490ec9 (patch) | |
tree | 7fc9a3ff07589aa4ff3a0bf6b7c5f15399566d76 /bin | |
parent | f45b16d7b994208f488829818575d397cf1e6492 (diff) | |
download | debvm-a7d8ecc4387619f88ff803a0bee79e4a44490ec9.tar.gz |
debefivm-run: fix parsing of --efi-vars option
The option would previously cause an error message scrolling by and
proceed as if the option wasn't given.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/debefivm-run | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/debefivm-run b/bin/debefivm-run index c93d7d2..50e87de 100755 --- a/bin/debefivm-run +++ b/bin/debefivm-run @@ -165,14 +165,22 @@ while getopts :a:gi:s:-: OPTCHAR; do graphical|help) "opt_$OPTARG" ;; - architecture|efi-vars|image|netopt|skip|sshport|transport) + architecture|image|netopt|skip|sshport|transport) test "$OPTIND" -gt "$#" && usage_error "missing argument for --$OPTARG" "opt_$OPTARG" "$(nth_arg "$OPTIND" "$@")" OPTIND=$((OPTIND+1)) ;; - architecture=*|efi-vars=*|image=*|netopt=*|skip=*|sshport=*|transport=*) + efi-vars) + test "$OPTIND" -gt "$#" && usage_error "missing argument for --$OPTARG" + opt_efi_vars "$(nth_arg "$OPTIND" "$@")" + OPTIND=$((OPTIND+1)) + ;; + architecture=*|image=*|netopt=*|skip=*|sshport=*|transport=*) "opt_${OPTARG%%=*}" "${OPTARG#*=}" ;; + efi-vars=*) + opt_efi_vars "${OPTARG#*=}" + ;; *) usage_error "unrecognized option --$OPTARG" ;; |