]> git.pld-linux.org Git - packages/NetworkManager.git/blame - NetworkManager-pld.patch
- do not bcond patch sources
[packages/NetworkManager.git] / NetworkManager-pld.patch
CommitLineData
679fb6a7
MB
1diff -urN NetworkManager-0.9.4.0/configure.ac NetworkManager-0.9.4.0.new/configure.ac
2--- NetworkManager-0.9.4.0/configure.ac 2012-03-23 21:11:15.000000000 +0100
3+++ NetworkManager-0.9.4.0.new/configure.ac 2012-03-24 11:29:26.057723008 +0100
4@@ -107,7 +107,7 @@
5 dnl
6 AC_C_BIGENDIAN
7
8-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 or exherbo]))
9+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 pld]))
10 if test "z$with_distro" = "z"; then
11 AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat")
12 AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
13@@ -121,6 +121,7 @@
14 AC_CHECK_FILE(/etc/pardus-release,with_distro="pardus")
15 AC_CHECK_FILE(/etc/linexa-release,with_distro="linexa")
16 AC_CHECK_FILE(/etc/exherbo-release,with_distro="exherbo")
17+ AC_CHECK_FILE(/etc/pld-release,with_distro="pld")
18 if test "z$with_distro" = "z"; then
19 with_distro=`lsb_release -is`
20 fi
21@@ -132,7 +133,7 @@
22 exit 1
23 else
24 case $with_distro in
25- redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa|exherbo|generic) ;;
26+ redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa|exherbo|generic|pld) ;;
27 *)
28 echo "Your distribution (${with_distro}) is not yet supported! (patches welcome)"
29 exit 1
30@@ -205,6 +206,11 @@
31 AC_DEFINE(TARGET_EXHERBO, 1, [Define if you have Exherbo])
32 fi
33
34+AM_CONDITIONAL(TARGET_PLD, test x"$with_distro" = xpld)
35+if test x"$with_distro" = xpld; then
36+ AC_DEFINE(TARGET_PLD, 1, [Define if you have PLD])
37+fi
38+
39 dnl
40 dnl Distribution version string
41 dnl
42@@ -790,6 +796,8 @@
43 initscript/paldo/NetworkManager
44 initscript/Mandriva/Makefile
45 initscript/Mandriva/networkmanager
46+initscript/PLD/Makefile
47+initscript/PLD/NetworkManager
48 initscript/linexa/Makefile
49 initscript/linexa/networkmanager
50 introspection/Makefile
51diff -urN NetworkManager-0.9.4.0/initscript/Makefile.am NetworkManager-0.9.4.0.new/initscript/Makefile.am
52--- NetworkManager-0.9.4.0/initscript/Makefile.am 2011-04-19 07:06:22.000000000 +0200
53+++ NetworkManager-0.9.4.0.new/initscript/Makefile.am 2012-03-24 11:25:37.842292690 +0100
0427601f
MB
54@@ -26,3 +26,6 @@
55 if TARGET_LINEXA
56 SUBDIRS += linexa
8af70d51
MB
57 endif
58+if TARGET_PLD
59+SUBDIRS += PLD
60+endif
679fb6a7
MB
61diff -urN NetworkManager-0.9.4.0/initscript/PLD/Makefile.am NetworkManager-0.9.4.0.new/initscript/PLD/Makefile.am
62--- NetworkManager-0.9.4.0/initscript/PLD/Makefile.am 1970-01-01 01:00:00.000000000 +0100
63+++ NetworkManager-0.9.4.0.new/initscript/PLD/Makefile.am 2012-03-24 11:25:37.845626005 +0100
b5801361 64@@ -0,0 +1,5 @@
8af70d51
MB
65+EXTRA_DIST = NetworkManager
66+DISTCLEANFILES = NetworkManager
67+
68+initddir = $(sysconfdir)/rc.d/init.d
69+initd_SCRIPTS = NetworkManager
679fb6a7
MB
70diff -urN NetworkManager-0.9.4.0/initscript/PLD/NetworkManager.in NetworkManager-0.9.4.0.new/initscript/PLD/NetworkManager.in
71--- NetworkManager-0.9.4.0/initscript/PLD/NetworkManager.in 1970-01-01 01:00:00.000000000 +0100
72+++ NetworkManager-0.9.4.0.new/initscript/PLD/NetworkManager.in 2012-03-24 11:25:37.845626005 +0100
f129e674 73@@ -0,0 +1,75 @@
8af70d51
MB
74+#!/bin/sh
75+#
76+# NetworkManager NetworkManager daemon
77+#
78+# chkconfig: 345 99 01
79+#
80+# description: This is a daemon for automatically switching network \
81+# connections to the best available connection.
82+#
83+# processname: NetworkManager
84+# pidfile: /var/run/NetworkManager.pid
85+#
86+
87+# Source function library.
88+. /etc/rc.d/init.d/functions
89+
ca29eb7e
ER
90+upstart_controlled
91+
8af70d51
MB
92+# Source networking configuration.
93+. /etc/sysconfig/network
94+
95+# Check that networking is up.
96+if is_yes "${NETWORKING}"; then
97+ if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
98+ msg_network_down NetworkManager
99+ exit 1
100+ fi
101+else
102+ exit 0
103+fi
104+
105+start() {
106+ # Check if the service is already running?
107+ if [ ! -f /var/lock/subsys/NetworkManager ]; then
108+ msg_starting NetworkManager
109+ daemon NetworkManager --pid-file=/var/run/NetworkManager.pid
110+ RETVAL=$?
111+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/NetworkManager
112+ else
113+ msg_already_running NetworkManager
114+ fi
115+}
116+stop() {
117+ if [ -f /var/lock/subsys/NetworkManager ]; then
118+ # Stop daemons.
119+ msg_stopping NetworkManager
120+ killproc NetworkManager
121+ rm -f /var/lock/subsys/NetworkManager
122+ else
123+ msg_not_running NetworkManager
124+ fi
125+}
126+
f129e674 127+RETVAL=0
8af70d51
MB
128+case "$1" in
129+ start)
130+ start
131+ ;;
132+ stop)
133+ stop
134+ ;;
135+ restart)
136+ stop
137+ start
138+ ;;
139+ status)
140+ status NetworkManager
141+ RETVAL=$?
142+ ;;
143+ *)
144+ msg_usage "$0 {start|stop|restart|status}"
145+ exit 3
146+esac
147+
148+exit $RETVAL
679fb6a7
MB
149diff -urN NetworkManager-0.9.4.0/src/backends/Makefile.am NetworkManager-0.9.4.0.new/src/backends/Makefile.am
150--- NetworkManager-0.9.4.0/src/backends/Makefile.am 2012-02-27 16:57:16.000000000 +0100
151+++ NetworkManager-0.9.4.0.new/src/backends/Makefile.am 2012-03-24 11:30:34.634018164 +0100
152@@ -64,6 +64,10 @@
153 libnmbackend_la_SOURCES += NetworkManagerExherbo.c
154 endif
155
156+if TARGET_PLD
157+libnmbackend_la_SOURCES += NetworkManagerPLD.c
158+endif
159+
160 libnmbackend_la_LIBADD += \
161 $(top_builddir)/src/logging/libnm-logging.la \
162 $(LIBNL_LIBS) \
163diff -urN NetworkManager-0.9.4.0/src/backends/NetworkManagerPLD.c NetworkManager-0.9.4.0.new/src/backends/NetworkManagerPLD.c
164--- NetworkManager-0.9.4.0/src/backends/NetworkManagerPLD.c 1970-01-01 01:00:00.000000000 +0100
165+++ NetworkManager-0.9.4.0.new/src/backends/NetworkManagerPLD.c 2012-03-24 11:46:34.925482485 +0100
166@@ -0,0 +1,68 @@
e9eb136c 167+/* NetworkManager -- Network link manager
168+ *
8af70d51 169+ * Patryk Zawadzki <patrys@pld-linux.org>
e9eb136c 170+ *
171+ * This program is free software; you can redistribute it and/or modify
172+ * it under the terms of the GNU General Public License as published by
173+ * the Free Software Foundation; either version 2 of the License, or
174+ * (at your option) any later version.
175+ *
176+ * This program is distributed in the hope that it will be useful,
177+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
178+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
179+ * GNU General Public License for more details.
180+ *
181+ * You should have received a copy of the GNU General Public License
182+ * along with this program; if not, write to the Free Software
183+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
184+ *
185+ * (C) Copyright 2004 RedHat, Inc.
186+ * (C) Copyright 2004 Narayan Newton
187+ * (C) Copyright 2005 wrobell <wrobell@pld-linux.org>
679fb6a7 188+ * (C) Copyright 2007, 2012 Marcin Banasiak <megabajt@pld-linux.org>
8af70d51 189+ * (C) Copyright 2005-2008 Patryk Zawadzki <patrys@pld-linux.org>
e9eb136c 190+ */
191+
8af70d51
MB
192+#ifdef HAVE_CONFIG_H
193+#include <config.h>
194+#endif
195+
8af70d51 196+#include "NetworkManagerGeneric.h"
e9eb136c 197+#include "NetworkManagerUtils.h"
e9eb136c 198+
199+/*
679fb6a7 200+ * nm_backend_enable_loopback
e9eb136c 201+ *
202+ * Bring up the loopback interface
203+ *
204+ */
679fb6a7 205+void nm_backend_enable_loopback (void)
e9eb136c 206+{
8af70d51 207+ nm_generic_enable_loopback ();
e9eb136c 208+}
209+
e9eb136c 210+/*
679fb6a7 211+ * nm_backend_update_dns
e9eb136c 212+ *
8af70d51
MB
213+ * Invalidate the nscd host cache, if it exists, since
214+ * we changed resolv.conf.
e9eb136c 215+ *
216+ */
679fb6a7 217+void nm_backend_update_dns (void)
e9eb136c 218+{
8af70d51 219+ if (g_file_test ("/usr/sbin/nscd", G_FILE_TEST_EXISTS | G_FILE_TEST_IS_EXECUTABLE | G_FILE_TEST_IS_REGULAR)) {
53b95e6c 220+ nm_spawn_process ("/usr/sbin/nscd -i hosts");
8af70d51 221+ }
d3bb33da 222+}
223+
679fb6a7
MB
224+/*
225+ * nm_backend_ipv6_use_tempaddr
226+ *
227+ * Get net.ipv6.conf.default.use_tempaddr from /etc/sysctl.conf or
228+ * /lib/sysctl.d/sysctl.conf
229+ *
230+ */
231+int nm_backend_ipv6_use_tempaddr (void)
232+{
233+ return nm_generic_ipv6_use_tempaddr ();
234+}
235diff -urN NetworkManager-0.9.4.0/src/settings/plugins/Makefile.am NetworkManager-0.9.4.0.new/src/settings/plugins/Makefile.am
236--- NetworkManager-0.9.4.0/src/settings/plugins/Makefile.am 2012-02-08 17:44:53.000000000 +0100
237+++ NetworkManager-0.9.4.0.new/src/settings/plugins/Makefile.am 2012-03-24 11:25:37.845626005 +0100
f129e674 238@@ -4,6 +4,10 @@
0427601f
MB
239 SUBDIRS+=ifcfg-rh
240 endif
f129e674
ŁK
241
242+if TARGET_PLD
243+SUBDIRS+=ifcfg-rh
244+endif
245+
246 if TARGET_SUSE
247 SUBDIRS+=ifcfg-suse
248 endif
This page took 0.135132 seconds and 4 git commands to generate.