mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 14:50:07 +01:00
ifcfg-rh: get rid of LAST_CONNECT
timestamps are now kept in /var/log/NetworkManager/timestamps
This commit is contained in:
parent
83d8677963
commit
2e3e171171
2 changed files with 0 additions and 23 deletions
|
|
@ -138,21 +138,6 @@ make_connection_setting (const char *file,
|
|||
svTrueValue (ifcfg, "ONBOOT", TRUE),
|
||||
NULL);
|
||||
|
||||
value = svGetValue (ifcfg, "LAST_CONNECT", FALSE);
|
||||
if (value) {
|
||||
unsigned long int tmp;
|
||||
guint64 timestamp;
|
||||
|
||||
errno = 0;
|
||||
tmp = strtoul (value, NULL, 10);
|
||||
if (errno == 0) {
|
||||
timestamp = (guint64) tmp;
|
||||
g_object_set (s_con, NM_SETTING_CONNECTION_TIMESTAMP, timestamp, NULL);
|
||||
} else
|
||||
PLUGIN_WARN (IFCFG_PLUGIN_NAME, " warning: invalid LAST_CONNECT time");
|
||||
g_free (value);
|
||||
}
|
||||
|
||||
value = svGetValue (ifcfg, "USERS", FALSE);
|
||||
if (value) {
|
||||
char **items, **iter;
|
||||
|
|
|
|||
|
|
@ -985,7 +985,6 @@ write_wired_setting (NMConnection *connection, shvarFile *ifcfg, GError **error)
|
|||
static void
|
||||
write_connection_setting (NMSettingConnection *s_con, shvarFile *ifcfg)
|
||||
{
|
||||
char *tmp;
|
||||
guint32 n, i;
|
||||
GString *str;
|
||||
|
||||
|
|
@ -995,13 +994,6 @@ write_connection_setting (NMSettingConnection *s_con, shvarFile *ifcfg)
|
|||
nm_setting_connection_get_autoconnect (s_con) ? "yes" : "no",
|
||||
FALSE);
|
||||
|
||||
svSetValue (ifcfg, "LAST_CONNECT", NULL, FALSE);
|
||||
if (nm_setting_connection_get_timestamp (s_con)) {
|
||||
tmp = g_strdup_printf ("%" G_GUINT64_FORMAT, nm_setting_connection_get_timestamp (s_con));
|
||||
svSetValue (ifcfg, "LAST_CONNECT", tmp, FALSE);
|
||||
g_free (tmp);
|
||||
}
|
||||
|
||||
/* Permissions */
|
||||
svSetValue (ifcfg, "USERS", NULL, FALSE);
|
||||
n = nm_setting_connection_get_num_permissions (s_con);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue