6abeb6f grubby-bls: make --update-kernel ALL to update kernelopts var in grubenv

Authored and Committed by javierm 5 years ago
    grubby-bls: make --update-kernel ALL to update kernelopts var in grubenv
    
    Currently there's no way to update the kernelopts variable defined in the
    grubenv by using the grubby wrapper. Updating it with grub2-editenv - set
    is tedious and error prone so let's use --update-kernel=ALL option for it.
    
    This command currently iterates over all the BLS entries and update them
    individually, but makes more sense to update the kernelopts grubenv var
    and only update the BLS entries that don't have the $kernelopts var in
    their options field.
    
    If after an update one of these BLS entries have exactly the same params
    in their options field than the ones set in $kernelopts, set the options
    field to $kernelopts again since the parameters have converged again.
    
    That way the modified BLS entries will only have a custom options field
    while its value diverged from the $kernelopts defined in grubenv.
    
    Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
    
        
file modified
+30 -2
file modified
+4 -1