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
|
diff -u -r -N a/config.h.in b/config.h.in
--- a/config.h.in 2012-08-07 18:07:02.000000000 +0200
+++ b/config.h.in 2012-08-08 02:26:19.950000001 +0200
@@ -189,6 +189,9 @@
/* Define if you have Mandriva */
#undef TARGET_MANDRIVA
+/* Define if you have NuTyX */
+#undef TARGET_NUTYX
+
/* Define if you have Paldo */
#undef TARGET_PALDO
diff -u -r -N a/configure.ac b/configure.ac
--- a/configure.ac 2012-08-07 18:06:40.000000000 +0200
+++ b/configure.ac 2012-08-08 02:28:15.728000001 +0200
@@ -107,7 +107,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, exherbo or lfs]))
+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, lfs 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")
@@ -122,6 +122,7 @@
AC_CHECK_FILE(/etc/linexa-release,with_distro="linexa")
AC_CHECK_FILE(/etc/exherbo-release,with_distro="exherbo")
AC_CHECK_FILE(/etc/lfs-release,with_distro="lfs")
+ AC_CHECK_FILE(/etc/nutyx-version,with_distro="nutyx")
if test "z$with_distro" = "z"; then
with_distro=`lsb_release -is`
fi
@@ -133,7 +134,7 @@
exit 1
else
case $with_distro in
- redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa|exherbo|lfs|generic) ;;
+ redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa|exherbo|lfs|nutyx|generic) ;;
*)
echo "Your distribution (${with_distro}) is not yet supported! (patches welcome)"
exit 1
@@ -211,6 +212,11 @@
AC_DEFINE(TARGET_LFS, 1, [Define if you have Linux From Scratch])
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
diff -u -r -N a/src/backends/Makefile.am b/src/backends/Makefile.am
--- a/src/backends/Makefile.am 2012-08-02 22:41:52.000000000 +0200
+++ b/src/backends/Makefile.am 2012-08-08 02:28:44.369000001 +0200
@@ -68,6 +68,10 @@
libnmbackend_la_SOURCES += NetworkManagerLFS.c
endif
+if TARGET_NUTYX
+libnmbackend_la_SOURCES += NetworkManagerNuTyX.c
+endif
+
libnmbackend_la_LIBADD += \
$(top_builddir)/src/logging/libnm-logging.la \
$(LIBNL_LIBS) \
diff -u -r -N a/src/backends/NetworkManagerNuTyX.c b/src/backends/NetworkManagerNuTyX.c
--- a/src/backends/NetworkManagerNuTyX.c 1970-01-01 01:00:00.000000000 +0100
+++ b/src/backends/NetworkManagerNuTyX.c 2012-08-08 02:31:21.876000001 +0200
@@ -0,0 +1,50 @@
+/* NetworkManager -- Network link manager
+ *
+ * Backend implementation for NuTyX, imported from Linux From Scratch http://www.linuxfromscratch.org/
+ *
+ * Wayne Blaszczyk <wblaszcz@bigpond.net.au>
+ * Armin K. <krejzi@email.com>
+ *
+ * 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 Tom Parker
+ * (C) Copyright 2004 Matthew Garrett
+ * (C) Copyright 2004 - 2012 Red Hat, Inc.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "NetworkManagerGeneric.h"
+#include "NetworkManagerUtils.h"
+
+void nm_backend_enable_loopback (void)
+{
+ nm_generic_enable_loopback ();
+}
+
+void nm_backend_update_dns (void)
+{
+ if (g_file_test("/var/run/nscd/nscd.pid", G_FILE_TEST_EXISTS))
+ nm_spawn_process ("/usr/sbin/nscd -i hosts");
+}
+
+int nm_backend_ipv6_use_tempaddr (void)
+{
+ return nm_generic_ipv6_use_tempaddr ();
+}
|