ifcfg-rh: fix svSetValue() to properly handle empty variables
svSetValue() called svGetValue() which would return %NULL for empty variables. That is wrong, because it caused svSetValue() to add the variable anew.
This commit is contained in:
@@ -382,7 +382,7 @@ svSetValue (shvarFile *s, const char *key, const char *value, gboolean verbatim)
|
||||
newval = value;
|
||||
else
|
||||
newval = svEscape (value, &newval_free);
|
||||
oldval = svGetValue (s, key, FALSE);
|
||||
oldval = svGetValueFull (s, key, FALSE);
|
||||
|
||||
if (!newval || !newval[0]) {
|
||||
/* delete value */
|
||||
|
Reference in New Issue
Block a user