mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 19:00:11 +01:00
ifcfg-rh: don't write LAST_CONNECT if it's 0
This commit is contained in:
parent
5ebed3ebfa
commit
f40d502492
1 changed files with 7 additions and 3 deletions
|
|
@ -525,9 +525,13 @@ write_connection_setting (NMSettingConnection *s_con, shvarFile *ifcfg)
|
|||
svSetValue (ifcfg, "ONBOOT",
|
||||
nm_setting_connection_get_autoconnect (s_con) ? "yes" : "no",
|
||||
FALSE);
|
||||
tmp = g_strdup_printf ("%llu", nm_setting_connection_get_timestamp (s_con));
|
||||
svSetValue (ifcfg, "LAST_CONNECT", tmp, FALSE);
|
||||
g_free (tmp);
|
||||
|
||||
svSetValue (ifcfg, "LAST_CONNECT", NULL, FALSE);
|
||||
if (nm_setting_connection_get_timestamp (s_con)) {
|
||||
tmp = g_strdup_printf ("%llu", nm_setting_connection_get_timestamp (s_con));
|
||||
svSetValue (ifcfg, "LAST_CONNECT", tmp, FALSE);
|
||||
g_free (tmp);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue