]>
Commit | Line | Data |
---|---|---|
0427601f MB |
1 | diff -urN NetworkManager-0.8.2/configure.ac NetworkManager-0.8.2.new//configure.ac |
2 | --- NetworkManager-0.8.2/configure.ac 2010-11-03 21:10:45.000000000 +0100 | |
3 | +++ NetworkManager-0.8.2.new//configure.ac 2010-11-04 23:08:43.530778095 +0100 | |
4 | @@ -84,7 +84,7 @@ | |
8af70d51 MB |
5 | dnl |
6 | AC_C_BIGENDIAN | |
7 | ||
0427601f MB |
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 or linexa])) |
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 or pld])) | |
8af70d51 MB |
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") | |
0427601f MB |
13 | @@ -97,6 +97,7 @@ |
14 | AC_CHECK_FILE(/etc/mandriva-release,with_distro="mandriva") | |
15 | AC_CHECK_FILE(/etc/pardus-release,with_distro="pardus") | |
16 | AC_CHECK_FILE(/etc/linexa-release,with_distro="linexa") | |
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 | @@ -108,7 +109,7 @@ | |
e9eb136c | 22 | exit 1 |
23 | else | |
24 | case $with_distro in | |
0427601f MB |
25 | - redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa) ;; |
26 | + redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa|pld) ;; | |
e9eb136c | 27 | *) |
28 | echo "Your distribution (${with_distro}) is not yet supported! (patches welcome)" | |
29 | exit 1 | |
0427601f MB |
30 | @@ -171,6 +172,11 @@ |
31 | AC_DEFINE(TARGET_LINEXA, 1, [Define if you have linexa]) | |
8af70d51 | 32 | fi |
e9eb136c | 33 | |
7e654435 | 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 | + | |
0427601f MB |
39 | dnl |
40 | dnl Distribution version string | |
41 | dnl | |
42 | @@ -549,6 +555,8 @@ | |
8af70d51 MB |
43 | initscript/paldo/NetworkManager |
44 | initscript/Mandriva/Makefile | |
45 | initscript/Mandriva/networkmanager | |
46 | +initscript/PLD/Makefile | |
47 | +initscript/PLD/NetworkManager | |
0427601f MB |
48 | initscript/linexa/Makefile |
49 | initscript/linexa/networkmanager | |
8af70d51 | 50 | introspection/Makefile |
0427601f MB |
51 | diff -urN NetworkManager-0.8.2/initscript/Makefile.am NetworkManager-0.8.2.new//initscript/Makefile.am |
52 | --- NetworkManager-0.8.2/initscript/Makefile.am 2010-10-19 01:44:05.000000000 +0200 | |
53 | +++ NetworkManager-0.8.2.new//initscript/Makefile.am 2010-11-04 23:09:47.487444761 +0100 | |
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 | |
0427601f MB |
61 | diff -urN NetworkManager-0.8.2/initscript/PLD/Makefile.am NetworkManager-0.8.2.new//initscript/PLD/Makefile.am |
62 | --- NetworkManager-0.8.2/initscript/PLD/Makefile.am 1970-01-01 01:00:00.000000000 +0100 | |
63 | +++ NetworkManager-0.8.2.new//initscript/PLD/Makefile.am 2010-11-04 21:54:27.000000000 +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 | |
0427601f MB |
70 | diff -urN NetworkManager-0.8.2/initscript/PLD/NetworkManager.in NetworkManager-0.8.2.new//initscript/PLD/NetworkManager.in |
71 | --- NetworkManager-0.8.2/initscript/PLD/NetworkManager.in 1970-01-01 01:00:00.000000000 +0100 | |
72 | +++ NetworkManager-0.8.2.new//initscript/PLD/NetworkManager.in 2010-11-04 21:54:27.000000000 +0100 | |
8af70d51 MB |
73 | @@ -0,0 +1,74 @@ |
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 | + | |
90 | +# Source networking configuration. | |
91 | +. /etc/sysconfig/network | |
92 | + | |
93 | +# Check that networking is up. | |
94 | +if is_yes "${NETWORKING}"; then | |
95 | + if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then | |
96 | + msg_network_down NetworkManager | |
97 | + exit 1 | |
98 | + fi | |
99 | +else | |
100 | + exit 0 | |
101 | +fi | |
102 | + | |
103 | +start() { | |
104 | + # Check if the service is already running? | |
105 | + if [ ! -f /var/lock/subsys/NetworkManager ]; then | |
106 | + msg_starting NetworkManager | |
107 | + daemon NetworkManager --pid-file=/var/run/NetworkManager.pid | |
108 | + RETVAL=$? | |
109 | + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/NetworkManager | |
110 | + else | |
111 | + msg_already_running NetworkManager | |
112 | + fi | |
113 | +} | |
114 | +stop() { | |
115 | + if [ -f /var/lock/subsys/NetworkManager ]; then | |
116 | + # Stop daemons. | |
117 | + msg_stopping NetworkManager | |
118 | + killproc NetworkManager | |
119 | + rm -f /var/lock/subsys/NetworkManager | |
120 | + else | |
121 | + msg_not_running NetworkManager | |
122 | + fi | |
123 | +} | |
124 | + | |
125 | +RETVAL=0 | |
126 | + | |
127 | +case "$1" in | |
128 | + start) | |
129 | + start | |
130 | + ;; | |
131 | + stop) | |
132 | + stop | |
133 | + ;; | |
134 | + restart) | |
135 | + stop | |
136 | + start | |
137 | + ;; | |
138 | + status) | |
139 | + status NetworkManager | |
140 | + RETVAL=$? | |
141 | + ;; | |
142 | + *) | |
143 | + msg_usage "$0 {start|stop|restart|status}" | |
144 | + exit 3 | |
145 | +esac | |
146 | + | |
147 | +exit $RETVAL | |
0427601f MB |
148 | diff -urN NetworkManager-0.8.2/src/backends/Makefile.am NetworkManager-0.8.2.new//src/backends/Makefile.am |
149 | --- NetworkManager-0.8.2/src/backends/Makefile.am 2010-10-19 01:44:05.000000000 +0200 | |
150 | +++ NetworkManager-0.8.2.new//src/backends/Makefile.am 2010-11-04 23:10:33.174111428 +0100 | |
151 | @@ -57,6 +57,10 @@ | |
152 | libnmbackend_la_SOURCES += NetworkManagerLinexa.c | |
153 | endif | |
b5801361 MB |
154 | |
155 | +if TARGET_PLD | |
156 | +libnmbackend_la_SOURCES += NetworkManagerPLD.c | |
157 | +endif | |
158 | + | |
0427601f MB |
159 | libnmbackend_la_LIBADD += \ |
160 | $(top_builddir)/src/logging/libnm-logging.la \ | |
161 | $(DBUS_LIBS) \ | |
162 | diff -urN NetworkManager-0.8.2/src/backends/NetworkManagerPLD.c NetworkManager-0.8.2.new//src/backends/NetworkManagerPLD.c | |
163 | --- NetworkManager-0.8.2/src/backends/NetworkManagerPLD.c 1970-01-01 01:00:00.000000000 +0100 | |
164 | +++ NetworkManager-0.8.2.new//src/backends/NetworkManagerPLD.c 2010-11-04 21:54:27.000000000 +0100 | |
8af70d51 | 165 | @@ -0,0 +1,62 @@ |
e9eb136c | 166 | +/* NetworkManager -- Network link manager |
167 | + * | |
8af70d51 | 168 | + * Patryk Zawadzki <patrys@pld-linux.org> |
e9eb136c | 169 | + * |
170 | + * This program is free software; you can redistribute it and/or modify | |
171 | + * it under the terms of the GNU General Public License as published by | |
172 | + * the Free Software Foundation; either version 2 of the License, or | |
173 | + * (at your option) any later version. | |
174 | + * | |
175 | + * This program is distributed in the hope that it will be useful, | |
176 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
177 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
178 | + * GNU General Public License for more details. | |
179 | + * | |
180 | + * You should have received a copy of the GNU General Public License | |
181 | + * along with this program; if not, write to the Free Software | |
182 | + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
183 | + * | |
184 | + * (C) Copyright 2004 RedHat, Inc. | |
185 | + * (C) Copyright 2004 Narayan Newton | |
186 | + * (C) Copyright 2005 wrobell <wrobell@pld-linux.org> | |
a735fda3 | 187 | + * (C) Copyright 2007 Marcin Banasiak <megabajt@pld-linux.org> |
8af70d51 | 188 | + * (C) Copyright 2005-2008 Patryk Zawadzki <patrys@pld-linux.org> |
e9eb136c | 189 | + */ |
190 | + | |
8af70d51 MB |
191 | +#ifdef HAVE_CONFIG_H |
192 | +#include <config.h> | |
193 | +#endif | |
194 | + | |
e9eb136c | 195 | +#include <stdio.h> |
8af70d51 MB |
196 | +#include <string.h> |
197 | +#include <stdlib.h> | |
198 | + | |
199 | +#include "NetworkManagerGeneric.h" | |
e02ef63c | 200 | +#include "nm-system.h" |
e9eb136c | 201 | +#include "NetworkManagerUtils.h" |
e9eb136c | 202 | + |
203 | +/* | |
204 | + * nm_system_enable_loopback | |
205 | + * | |
206 | + * Bring up the loopback interface | |
207 | + * | |
208 | + */ | |
209 | +void nm_system_enable_loopback (void) | |
210 | +{ | |
8af70d51 | 211 | + nm_generic_enable_loopback (); |
e9eb136c | 212 | +} |
213 | + | |
e9eb136c | 214 | +/* |
215 | + * nm_system_update_dns | |
216 | + * | |
8af70d51 MB |
217 | + * Invalidate the nscd host cache, if it exists, since |
218 | + * we changed resolv.conf. | |
e9eb136c | 219 | + * |
220 | + */ | |
221 | +void nm_system_update_dns (void) | |
222 | +{ | |
8af70d51 | 223 | + if (g_file_test ("/usr/sbin/nscd", G_FILE_TEST_EXISTS | G_FILE_TEST_IS_EXECUTABLE | G_FILE_TEST_IS_REGULAR)) { |
53b95e6c | 224 | + nm_spawn_process ("/usr/sbin/nscd -i hosts"); |
8af70d51 | 225 | + } |
d3bb33da | 226 | +} |
227 | + | |
0427601f MB |
228 | diff -urN NetworkManager-0.8.2/system-settings/plugins/Makefile.am NetworkManager-0.8.2.new//system-settings/plugins/Makefile.am |
229 | --- NetworkManager-0.8.2/system-settings/plugins/Makefile.am 2010-10-07 21:09:52.000000000 +0200 | |
230 | +++ NetworkManager-0.8.2.new//system-settings/plugins/Makefile.am 2010-11-04 23:12:52.904111428 +0100 | |
231 | @@ -1,5 +1,9 @@ | |
232 | SUBDIRS=keyfile | |
233 | ||
234 | +if TARGET_PLD | |
235 | +SUBDIRS+=ifcfg-rh | |
236 | +endif | |
237 | + | |
238 | if TARGET_REDHAT | |
239 | SUBDIRS+=ifcfg-rh | |
240 | endif |