Contents of /trunk/networkmanager/NetworkManagerMagellan.c
Parent Directory | Revision Log
Revision 980 -
(show annotations)
(download)
Sat Feb 13 11:25:26 2010 UTC (14 years, 7 months ago) by niro
File MIME type: text/plain
File size: 1960 byte(s)
Sat Feb 13 11:25:26 2010 UTC (14 years, 7 months ago) by niro
File MIME type: text/plain
File size: 1960 byte(s)
-networkmanager-0.7.999 custom files and patches
1 | /* NetworkManager -- Network link manager |
2 | * |
3 | * Backend implementation for the Magellan Linux distribution http://www.magellan-linux.de |
4 | * |
5 | * Niels Rogalla <niro@magellan-linux.de> |
6 | * |
7 | * Heavily based on NetworkManagerGentoo.c by Robert Paskowitz |
8 | * |
9 | * This program is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License as published by |
11 | * the Free Software Foundation; either version 2 of the License, or |
12 | * (at your option) any later version. |
13 | * |
14 | * This program is distributed in the hope that it will be useful, |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | * GNU General Public License for more details. |
18 | * |
19 | * You should have received a copy of the GNU General Public License along |
20 | * with this program; if not, write to the Free Software Foundation, Inc., |
21 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
22 | * |
23 | * (C) Copyright 2004 Tom Parker |
24 | * (C) Copyright 2004 Matthew Garrett |
25 | * (C) Copyright 2004 Red Hat, Inc. |
26 | */ |
27 | |
28 | #ifdef HAVE_CONFIG_H |
29 | #include <config.h> |
30 | #endif |
31 | |
32 | #include <stdio.h> |
33 | #include <string.h> |
34 | #include <stdlib.h> |
35 | |
36 | #include "NetworkManagerGeneric.h" |
37 | #include "NetworkManagerSystem.h" |
38 | #include "NetworkManagerUtils.h" |
39 | |
40 | /* |
41 | * nm_system_enable_loopback |
42 | * |
43 | * Bring up the loopback interface |
44 | * |
45 | */ |
46 | void nm_system_enable_loopback (void) |
47 | { |
48 | /* No need to run net.lo if it is already running */ |
49 | if (nm_spawn_process ("/etc/init.d/localnet status") != 0) |
50 | nm_spawn_process("/etc/init.d/localnet start"); |
51 | } |
52 | |
53 | /* |
54 | * nm_system_update_dns |
55 | * |
56 | * Make glibc/nscd aware of any changes to the resolv.conf file by |
57 | * restarting nscd. Only restart if already running. |
58 | * |
59 | */ |
60 | void nm_system_update_dns (void) |
61 | { |
62 | #ifdef NM_NO_NAMED |
63 | if (nm_spawn_process ("/etc/init.d/nscd status") == 0) |
64 | nm_spawn_process ("/etc/init.d/nscd restart"); |
65 | #else |
66 | nm_spawn_process("/usr/bin/killall -q nscd"); |
67 | #endif |
68 | } |