[PATCH] Tiny Core Linux support patch



Hi,

I am the maintainer of GNOME and NetworkManager packages at Tiny Core Linux. This is the patch
to add NetworkManager support for Tiny Core Linux.

Regards,

Sercan Arslan

===============================================================
diff -raupN NetworkManager_orig/configure.ac NetworkManager_tinycore/configure.ac
--- NetworkManager_orig/configure.ac 2010-07-07 18:34:18.000000000 +0000
+++ NetworkManager_tinycore/configure.ac 2010-07-07 19:16:31.390359245 +0000
@@ -83,7 +83,7 @@ dnl Make sha1.c happy on big endian syst
 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 or pardus]))
+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 or tinycore]))
 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")
@@ -95,6 +95,7 @@ if test "z$with_distro" = "z"; then
  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")
+ AC_CHECK_FILE(/etc/sysconfig/tcuser,with_distro="tinycore")
  if test "z$with_distro" = "z"; then
  with_distro=`lsb_release -is`
  fi
@@ -106,7 +107,7 @@ if test "z$with_distro" = "z"; then
  exit 1
 else
  case $with_distro in
- redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus) ;;
+ redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|tinycore) ;;
  *)
  echo "Your distribution (${with_distro}) is not yet supported!  (patches welcome)"
  exit 1
@@ -164,6 +165,11 @@ if test x"$with_distro" = xpardus; then
   AC_DEFINE(TARGET_PARDUS, 1, [Define if you have Pardus])
 fi
 
+AM_CONDITIONAL(TARGET_TINYCORE, test x"$with_distro" = xtinycore)
+if test x"$with_distro" = xtinycore; then
+  AC_DEFINE(TARGET_TINYCORE, 1, [Define if you have Tiny Core Linux])
+fi
+
 dnl
 dnl Distribution version string
 dnl
diff -raupN NetworkManager_orig/src/backends/Makefile.am NetworkManager_tinycore/src/backends/Makefile.am
--- NetworkManager_orig/src/backends/Makefile.am 2010-07-07 18:34:19.000000000 +0000
+++ NetworkManager_tinycore/src/backends/Makefile.am 2010-07-07 19:16:31.390359245 +0000
@@ -55,6 +55,10 @@ if TARGET_PARDUS
 libnmbackend_la_SOURCES += NetworkManagerPardus.c
 endif
 
+if TARGET_TINYCORE
+libnmbackend_la_SOURCES += NetworkManagerTinyCore.c
+endif
+
 libnmbackend_la_LIBADD += \
  $(top_builddir)/src/logging/libnm-logging.la \
  $(DBUS_LIBS) \
diff -raupN NetworkManager_orig/src/backends/NetworkManagerTinyCore.c NetworkManager_tinycore/src/backends/NetworkManagerTinyCore.c
--- NetworkManager_orig/src/backends/NetworkManagerTinyCore.c 1970-01-01 00:00:00.000000000 +0000
+++ NetworkManager_tinycore/src/backends/NetworkManagerTinyCore.c 2010-07-07 19:16:31.390359245 +0000
@@ -0,0 +1,57 @@
+/* NetworkManager -- Network link manager
+ *
+ * Sercan Arslan <arslanserc gmail 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 RedHat, Inc.
+ * (C) Copyright 2010 Sercan Arslan
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "NetworkManagerGeneric.h"
+#include "nm-system.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 */
+}
+


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