summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArmin K <krejzi@email.com>2012-07-02 12:31:32 +0200
committerJiří Klimeš <jklimes@redhat.com>2012-07-02 12:54:12 +0200
commitb37ed68e183d0b0a642ae96ab3cc21830819c5b3 (patch)
tree4472c076317222946e9c3ad32ac176dbfda039d9 /src
parenta26ea1acc4bf54577b7e9a3bc788270a9d7d6c84 (diff)
downloadNetworkManager-b37ed68e183d0b0a642ae96ab3cc21830819c5b3.tar.gz
backends: add Linux From Scratch (LFS) support (bgo #679202)
Diffstat (limited to 'src')
-rw-r--r--src/backends/Makefile.am4
-rw-r--r--src/backends/NetworkManagerLFS.c50
2 files changed, 54 insertions, 0 deletions
diff --git a/src/backends/Makefile.am b/src/backends/Makefile.am
index 11a154a0db..647e5e5b34 100644
--- a/src/backends/Makefile.am
+++ b/src/backends/Makefile.am
@@ -64,6 +64,10 @@ if TARGET_EXHERBO
libnmbackend_la_SOURCES += NetworkManagerExherbo.c
endif
+if TARGET_LFS
+libnmbackend_la_SOURCES += NetworkManagerLFS.c
+endif
+
libnmbackend_la_LIBADD += \
$(top_builddir)/src/logging/libnm-logging.la \
$(LIBNL_LIBS) \
diff --git a/src/backends/NetworkManagerLFS.c b/src/backends/NetworkManagerLFS.c
new file mode 100644
index 0000000000..7df2031cf0
--- /dev/null
+++ b/src/backends/NetworkManagerLFS.c
@@ -0,0 +1,50 @@
+/* NetworkManager -- Network link manager
+ *
+ * Backend implementation for the 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 ();
+}