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