From 2f6207731e09a5901d49fde7944f48c73661820e Mon Sep 17 00:00:00 2001 From: Marta Lewandowska Date: Oct 04 2022 13:08:06 +0000 Subject: Fix passing --args without copy-default Fix so that --args are not passed by default if copy-default is not used. Set root when --args are passed without copy-default. --- diff --git a/grubby-bls b/grubby-bls index f09156b..f3650e3 100755 --- a/grubby-bls +++ b/grubby-bls @@ -827,13 +827,12 @@ fi remove_var_prefix "$(get_prefix)" if [[ -n $kernel ]]; then - if [[ $copy_default = "true" ]]; then - opts="${bls_options[$default_index]}" - if [[ -n $args ]]; then - opts="${opts} ${args}" - fi - else - opts="${args}" + opts="${bls_options[$default_index]}" + if [[ $copy_default != "true" ]]; then + opts=$(echo $opts | sed -e 's/ .*//') + fi + if [[ -n $args ]]; then + opts="${opts} ${args}" fi add_bls_fragment "${kernel}" "${title}" "${opts}" "${initrd}" \