Skip to content
  • Thomas Haller's avatar
    adjust @ifcfg_compliant_with_kickstart test changing setting variables in ifcfg-rh files · 3fe47af5
    Thomas Haller authored
    When ifcfg-rh writer persists a connection profile to disk, it would
    first load the pre-existing file, modify it, and write it back.
    
    In particular, it aims to keep comments and newlines, the order of
    variables, and unknown variables.
    
    Until recently, when writing the profile NetworkManager would set the
    keys that make up the new profile, and explicitly clear some of the
    keys. Since [1] (1.23.1), NetworkManager will no longer explicitly clear
    any keys, instead, all (well known) keys that were not explicitly
    set will be cleared automatically.
    
    In this case, there is a change in behavior because the variable
    BOOTPROTO would no longer be preserved. Just don't check for that.
    
    You can see that previously the variable was unset, because it kept
    the single quotes BOOTPROTO='static'. Had NetworkManager touched the
    variable, it would have removed these quotes. But this variable was
    really bogus, it has no place in the profile as it is. It's good that
    we clear it now.
    
    Note that entirely unknown variables would still be preserved.
    
    [1] NetworkManager@07262b16
    3fe47af5