NetworkManager-config.patch 1.63 KB
Newer Older
Colin Walters's avatar
Colin Walters committed
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
From 7a8b9a75a0bd75d7548b428ee46ee16f296e45f7 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Thu, 12 Jan 2012 09:50:57 -0500
Subject: [PATCH] keyfile: Install default config file if we're TARGET_GENERIC

NetworkManager just segfaults on startup if there's no
/etc/NetworkManager/NetworkManager.conf, if we're TARGET_GENERIC, then
we are only using keyfiles, so install a basic config file.
---
 src/settings/plugins/keyfile/Makefile.am           |   10 +++++++++-
 .../plugins/keyfile/NetworkManager-keyfile.conf    |    2 ++
 2 files changed, 11 insertions(+), 1 deletions(-)
 create mode 100644 src/settings/plugins/keyfile/NetworkManager-keyfile.conf

diff --git a/src/settings/plugins/keyfile/Makefile.am b/src/settings/plugins/keyfile/Makefile.am
index e941e9b..e074873 100644
--- a/src/settings/plugins/keyfile/Makefile.am
+++ b/src/settings/plugins/keyfile/Makefile.am
@@ -57,6 +57,14 @@ libnm_settings_plugin_keyfile_la_LDFLAGS = -rdynamic
 
 keyfiledir=$(sysconfdir)/NetworkManager/system-connections
 
+if TARGET_GENERIC
+install_keyfile_conf=true
+else
+install_keyfile_conf=false
+endif
+
 install-data-hook:
 	$(mkinstalldirs) -m 0755 $(DESTDIR)$(keyfiledir)
-
+	if $(install_keyfile_conf); then \
+		install -m 0644 $(srcdir)/NetworkManager-keyfile.conf $(DESTDIR)/$(sysconfdir)/NetworkManager/NetworkManager.conf; \
+	fi
diff --git a/src/settings/plugins/keyfile/NetworkManager-keyfile.conf b/src/settings/plugins/keyfile/NetworkManager-keyfile.conf
new file mode 100644
index 0000000..c37b596
--- /dev/null
+++ b/src/settings/plugins/keyfile/NetworkManager-keyfile.conf
@@ -0,0 +1,2 @@
+[main]
+plugins=keyfile
-- 
1.7.6.4