[PATCH] backends: Add Pardus Linux support



Add Pardus Linux support to NetworkManager
---
 configure.ac                        |   10 +++++-
 src/backends/Makefile.am            |    4 ++
 src/backends/NetworkManagerPardus.c |   57 +++++++++++++++++++++++++++++++++++
 3 files changed, 69 insertions(+), 2 deletions(-)
 create mode 100644 src/backends/NetworkManagerPardus.c

diff --git a/configure.ac b/configure.ac
index 5cfec2e..dbd03ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,7 +83,7 @@ dnl Make sha1.c happy on big endian systems
 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 or mandriva]))
+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 or pardus]))
 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")
@@ -94,6 +94,7 @@ if test "z$with_distro" = "z"; then
 	AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware")
 	AC_CHECK_FILE(/etc/frugalware-release,with_distro="frugalware")
 	AC_CHECK_FILE(/etc/mandriva-release,with_distro="mandriva")
+	AC_CHECK_FILE(/etc/pardus-release,with_distro="pardus")
 	if test "z$with_distro" = "z"; then
 		with_distro=`lsb_release -is`
 	fi
@@ -105,7 +106,7 @@ if test "z$with_distro" = "z"; then
 	exit 1
 else
 	case $with_distro in
-		redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva) ;;
+		redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus) ;;
 		*)
 			echo "Your distribution (${with_distro}) is not yet supported!  (patches welcome)"
 			exit 1
@@ -158,6 +159,11 @@ if test x"$with_distro" = xmandriva; then
   AC_DEFINE(TARGET_MANDRIVA, 1, [Define if you have Mandriva])
 fi
 
+AM_CONDITIONAL(TARGET_PARDUS, test x"$with_distro" = xpardus)
+if test x"$with_distro" = xpardus; then
+  AC_DEFINE(TARGET_PARDUS, 1, [Define if you have Pardus])
+fi
+
 AC_MSG_CHECKING([Linux Wireless Extensions >= 18])
 AC_TRY_COMPILE([#ifndef __user
                 #define __user
diff --git a/src/backends/Makefile.am b/src/backends/Makefile.am
index 65c96b5..0e037c4 100644
--- a/src/backends/Makefile.am
+++ b/src/backends/Makefile.am
@@ -49,6 +49,10 @@ if TARGET_MANDRIVA
 libnmbackend_la_SOURCES += NetworkManagerMandriva.c
 endif
 
+if TARGET_PARDUS
+libnmbackend_la_SOURCES += NetworkManagerPardus.c
+endif
+
 libnmbackend_la_LIBADD += $(DBUS_LIBS) $(GLIB_LIBS)
 libnmbackend_la_CPPFLAGS = \
 	$(DBUS_CFLAGS) \
diff --git a/src/backends/NetworkManagerPardus.c b/src/backends/NetworkManagerPardus.c
new file mode 100644
index 0000000..52703e2
--- /dev/null
+++ b/src/backends/NetworkManagerPardus.c
@@ -0,0 +1,57 @@
+/* NetworkManager -- Network link manager
+ *
+ * Ozan Caglayan <ozan pardus org tr>
+ *
+ * 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 RedHat, Inc.
+ * (C) Copyright 2009 TUBITAK/UEKAE
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "NetworkManagerGeneric.h"
+#include "NetworkManagerSystem.h"
+
+/*
+ * nm_system_enable_loopback
+ *
+ * Bring up the loopback interface
+ *
+ */
+void nm_system_enable_loopback (void)
+{
+	nm_generic_enable_loopback ();
+}
+
+
+/*
+ * nm_system_update_dns
+ *
+ * Make glibc/nscd aware of any changes to the resolv.conf file by
+ * restarting nscd.
+ *
+ */
+void nm_system_update_dns (void)
+{
+	/* I'm not running nscd */
+}
+
-- 
1.6.3.4



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]