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