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