diff options
author | piernov <piernov@piernov.org> | 2012-03-06 11:44:08 +0000 |
---|---|---|
committer | piernov <piernov@piernov.org> | 2012-03-06 11:44:08 +0000 |
commit | 46d640db48946da838fc2e3d069f42172bcf3c48 (patch) | |
tree | e24f59a3d9e76caaa2a024d379c69beab1268d96 /networkmanager/NuTyX.patch | |
parent | 0641883124b3ffbec48cd07b0a480e310aae4903 (diff) | |
download | nutyx-extra-46d640db48946da838fc2e3d069f42172bcf3c48.tar.gz nutyx-extra-46d640db48946da838fc2e3d069f42172bcf3c48.tar.bz2 nutyx-extra-46d640db48946da838fc2e3d069f42172bcf3c48.tar.xz nutyx-extra-46d640db48946da838fc2e3d069f42172bcf3c48.zip |
networkmanager 0.9.3.995-1 màj port
Diffstat (limited to 'networkmanager/NuTyX.patch')
-rw-r--r-- | networkmanager/NuTyX.patch | 71 |
1 files changed, 57 insertions, 14 deletions
diff --git a/networkmanager/NuTyX.patch b/networkmanager/NuTyX.patch index c9758cf61..d7fee4c18 100644 --- a/networkmanager/NuTyX.patch +++ b/networkmanager/NuTyX.patch @@ -1,6 +1,6 @@ --- b/config.h.in 2011-05-07 13:34:44.000000000 +1000 +++ a/config.h.in 2011-05-07 13:34:44.000000000 +1000 -@@ -174,6 +174,9 @@ +@@ -177,6 +177,9 @@ /* Define if you have Gentoo */ #undef TARGET_GENTOO @@ -33,12 +33,12 @@ exit 1 else case $with_distro in -- redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa|exherbo) ;; -+ redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa|exherbo|nutyx) ;; +- redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa|exherbo|generic) ;; ++ redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa|exherbo|generic|nutyx) ;; *) echo "Your distribution (${with_distro}) is not yet supported! (patches welcome)" exit 1 -@@ -200,6 +201,11 @@ +@@ -205,6 +206,11 @@ AC_DEFINE(TARGET_EXHERBO, 1, [Define if you have Exherbo]) fi @@ -52,7 +52,7 @@ dnl --- b/src/backends/Makefile.am 2011-05-07 13:34:44.000000000 +1000 +++ a/src/backends/Makefile.am 2011-05-07 13:34:44.000000000 +1000 -@@ -61,6 +61,10 @@ +@@ -64,6 +64,10 @@ libnmbackend_la_SOURCES += NetworkManagerExherbo.c endif @@ -65,7 +65,7 @@ $(LIBNL_LIBS) \ --- b/src/backends/NetworkManagerNuTyX.c 1970-01-01 10:00:00.000000000 +1000 +++ a/src/backends/NetworkManagerNuTyX.c 2011-05-07 13:34:44.000000000 +1000 -@@ -0,0 +1,63 @@ +@@ -0,0 +1,107 @@ +/* NetworkManager -- Network link manager + * + * Jürg Billeter <juerg@paldo.org> @@ -95,38 +95,81 @@ +#include <config.h> +#endif + -+#include <stdio.h> -+#include <string.h> -+#include <stdlib.h> ++//#include <stdio.h> ++//#include <string.h> ++//#include <stdlib.h> + +#include "NetworkManagerGeneric.h" -+#include "nm-system.h" ++//#include "nm-system.h" +#include "NetworkManagerUtils.h" +#include "nm-logging.h" + +/* -+ * nm_system_enable_loopback ++ * nm_backend_enable_loopback + * + * Bring up the loopback interface + * + */ -+void nm_system_enable_loopback (void) ++void nm_backend_enable_loopback (void) +{ + nm_spawn_process ("/etc/rc.d/init.d/localnet restart"); +} + +/* -+ * nm_system_update_dns ++ * nm_backend_update_dns + * + * Invalidate the nscd host cache, if it exists, since + * we changed resolv.conf. + * + */ -+void nm_system_update_dns (void) ++void nm_backend_update_dns (void) +{ + if (g_file_test("/var/run/nscd/nscd.pid", G_FILE_TEST_EXISTS)) + nm_log_info (LOGD_DNS, "Clearing nscd hosts cache."); + nm_spawn_process ("/usr/sbin/nscd -i hosts"); +} + ++/* ++ * nm_backend_ipv6_use_tempaddr ++ * ++ * Get net.ipv6.conf.default.use_tempaddr value from /etc/sysctl.conf or ++ * /lib/sysctl.d/sysctl.conf ++ * ++ */ ++int nm_backend_ipv6_use_tempaddr (void) ++{ ++ char *contents = NULL; ++ gsize len = 0; ++ const char *group_name = "[forged_group]\n"; ++ char *sysctl_data = NULL; ++ GKeyFile *keyfile; ++ GError *error = NULL; ++ int tmp, ret = -1; ++ ++ /* Read file contents to a string. */ ++ if (!g_file_get_contents ("/etc/sysctl.conf", &contents, &len, NULL)) ++ if (!g_file_get_contents ("/lib/sysctl.d/sysctl.conf", &contents, &len, NULL)) ++ return -1; + ++ /* Prepend a group so that we can use GKeyFile parser. */ ++ sysctl_data = g_strdup_printf ("%s%s", group_name, contents); ++ ++ keyfile = g_key_file_new (); ++ if (keyfile == NULL) ++ goto done; ++ ++ if (!g_key_file_load_from_data (keyfile, sysctl_data, len + strlen (group_name), G_KEY_FILE_NONE, NULL)) ++ goto done; ++ ++ tmp = g_key_file_get_integer (keyfile, "forged_group", "net.ipv6.conf.default.use_tempaddr", &error); ++ if (error == NULL) ++ ret = tmp; ++ ++done: ++ g_free (contents); ++ g_free (sysctl_data); ++ g_clear_error (&error); ++ g_key_file_free (keyfile); ++ ++ return ret; ++} |