1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
--- b/config.h.in 2011-05-07 13:34:44.000000000 +1000
+++ a/config.h.in 2011-05-07 13:34:44.000000000 +1000
@@ -162,6 +162,9 @@
/* Define if you have Gentoo */
#undef TARGET_GENTOO
+/* Define if you have NuTyX */
+#undef TARGET_NUTYX
+
/* Define if you have linexa */
#undef TARGET_LINEXA
--- b/configure.ac 2011-05-07 13:34:44.000000000 +1000
+++ a/configure.ac 2011-05-07 13:34:44.000000000 +1000
@@ -106,7 +106,7 @@
dnl
AC_C_BIGENDIAN
-AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, suse, gentoo, debian, arch, slackware, paldo, mandriva, pardus, linexa or exherbo]))
+AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, suse, gentoo, debian, arch, slackware, paldo, mandriva, pardus, linexa, exherbo or nutyx]))
if test "z$with_distro" = "z"; then
AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat")
AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
@@ -120,6 +120,7 @@
AC_CHECK_FILE(/etc/pardus-release,with_distro="pardus")
AC_CHECK_FILE(/etc/linexa-release,with_distro="linexa")
AC_CHECK_FILE(/etc/exherbo-release,with_distro="exherbo")
+ AC_CHECK_FILE(/etc/nutyx-version,with_distro="nutyx")
if test "z$with_distro" = "z"; then
with_distro=`lsb_release -is`
fi
@@ -131,7 +132,7 @@
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) ;;
*)
echo "Your distribution (${with_distro}) is not yet supported! (patches welcome)"
exit 1
@@ -199,6 +200,11 @@
AC_DEFINE(TARGET_EXHERBO, 1, [Define if you have Exherbo])
fi
+AM_CONDITIONAL(TARGET_NUTYX, test x"$with_distro" = xnutyx)
+if test x"$with_distro" = xnutyx; then
+ AC_DEFINE(TARGET_NUTYX, 1, [Define if you have NuTyX])
+fi
+
dnl
dnl Distribution version string
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 @@
libnmbackend_la_SOURCES += NetworkManagerExherbo.c
endif
+if TARGET_NUTYX
+libnmbackend_la_SOURCES += NetworkManagerNuTyX.c
+endif
+
libnmbackend_la_LIBADD += \
$(top_builddir)/src/logging/libnm-logging.la \
$(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 @@
+/* NetworkManager -- Network link manager
+ *
+ * Jürg Billeter <juerg@paldo.org>
+ *
+ * Adapted for NuTyX by piernov <piernov@piernov.org>
+ * Heavily based on NetworkManagerRedhat.c by Dan Williams <dcbw@redhat.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2004 Red Hat, Inc.
+ * (C) Copyright 2006 Jürg Billeter
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "NetworkManagerGeneric.h"
+#include "nm-system.h"
+#include "NetworkManagerUtils.h"
+#include "nm-logging.h"
+
+/*
+ * nm_system_enable_loopback
+ *
+ * Bring up the loopback interface
+ *
+ */
+void nm_system_enable_loopback (void)
+{
+ nm_spawn_process ("/etc/rc.d/init.d/localnet restart");
+}
+
+/*
+ * nm_system_update_dns
+ *
+ * Invalidate the nscd host cache, if it exists, since
+ * we changed resolv.conf.
+ *
+ */
+void nm_system_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");
+}
+
+
|