ifcfg-rh: fix setting MTU to "automatic" for wired connections (rh #569319)

ifcfg-rh plugin was not able to reset MTU to "automatic" if it had been
set to a value, for wired connection. This fix removes "MTU" variable
from the ifcfg-* file when mtu is 0.
This commit is contained in:
Jiří Klimeš 2010-04-12 17:15:28 +02:00
parent 618c5f1b08
commit ab529302a7

View file

@ -807,6 +807,7 @@ write_wired_setting (NMConnection *connection, shvarFile *ifcfg, GError **error)
g_free (tmp);
}
svSetValue (ifcfg, "MTU", NULL, FALSE);
mtu = nm_setting_wired_get_mtu (s_wired);
if (mtu) {
tmp = g_strdup_printf ("%u", mtu);