Репозитории ALT
S: | 1.44.0-alt2 |
5.1: | 0.7.3-alt2.git20101007.M51.1 |
4.1: | 0.7.1-alt5.M41.5 |
Группа :: Система/Настройка/Сеть
Пакет: NetworkManager
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: alt-state-if-etcnet.patch
Скачать
Скачать
--- NetworkManager/src/nm-manager.c.orig 2008-11-05 19:22:23 +0300
+++ NetworkManager/src/nm-manager.c 2008-11-12 18:48:26 +0300
@@ -2,6 +2,8 @@
#include <netinet/ether.h>
#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
#include "nm-manager.h"
#include "nm-utils.h"
@@ -365,6 +367,19 @@ nm_manager_update_state (NMManager *mana
}
}
+ /*not set to disconndcted when there are routes*/
+ {
+ FILE* routes_pipe;
+ char routes_char[4],*dummy;
+ int routes_int;
+ routes_pipe = popen( "/sbin/ip route | wc -l", "r");
+ dummy = fgets( routes_char, 3, routes_pipe );
+ routes_int = atoi(routes_char);
+ if( new_state == NM_STATE_DISCONNECTED && routes_int )
+ new_state = NM_STATE_CONNECTED;
+ pclose(routes_pipe);
+ }
+
if (priv->state != new_state) {
priv->state = new_state;
g_object_notify (G_OBJECT (manager), NM_MANAGER_STATE);