Ethernet is enabled by default if settings file is not found
or the Wired entry is not found in the file.
---
 src/technology.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/technology.c b/src/technology.c
index 27ada40..c523182 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -304,7 +304,11 @@ static void load_state(struct connman_technology 
*technology)
        keyfile = __connman_storage_load_global();
        /* Fallback on disabling technology if file not found. */
        if (keyfile == NULL) {
-               technology->enable_persistent = FALSE;
+               if (technology->type == CONNMAN_SERVICE_TYPE_ETHERNET)
+                       /* We enable ethernet by default */
+                       technology->enable_persistent = TRUE;
+               else
+                       technology->enable_persistent = FALSE;
                return;
        }
 
@@ -316,7 +320,10 @@ static void load_state(struct connman_technology 
*technology)
        if (error == NULL)
                technology->enable_persistent = enable;
        else {
-               technology->enable_persistent = FALSE;
+               if (technology->type == CONNMAN_SERVICE_TYPE_ETHERNET)
+                       technology->enable_persistent = TRUE;
+               else
+                       technology->enable_persistent = FALSE;
                g_clear_error(&error);
        }
 done:
-- 
1.7.5.4

_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to