summary refs log tree commit diff
path: root/pkgs/tools/networking/network-manager/nixos-purity.patch
blob: 998c2f25b2b28c57c87af503512d2d6b36faf29a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
diff --git a/src/backends/NetworkManagerExherbo.c b/src/backends/NetworkManagerExherbo.c
index d027789..ef6b646 100644
--- a/src/backends/NetworkManagerExherbo.c
+++ b/src/backends/NetworkManagerExherbo.c
@@ -41,9 +41,9 @@ void nm_backend_update_dns (void)
 	/* Make glibc/nscd aware of any changes to the resolv.conf file by
 	 * restarting nscd. Only restart if already running.
 	 */
-	if (g_file_test ("/usr/sbin/nscd", G_FILE_TEST_IS_EXECUTABLE)) {
+	if (g_file_test ("@glibc@/sbin/nscd", G_FILE_TEST_IS_EXECUTABLE)) {
 		nm_log_info (LOGD_DNS, "Clearing nscd hosts cache.");
-		nm_spawn_process ("/usr/sbin/nscd -i hosts");
+		nm_spawn_process ("@glibc@/sbin/nscd -i hosts");
 	}
 }
 
diff --git a/src/dhcp-manager/nm-dhcp-dhclient.c b/src/dhcp-manager/nm-dhcp-dhclient.c
index 0932139..5b5aee8 100644
--- a/src/dhcp-manager/nm-dhcp-dhclient.c
+++ b/src/dhcp-manager/nm-dhcp-dhclient.c
@@ -68,10 +68,6 @@ const char *
 nm_dhcp_dhclient_get_path (const char *try_first)
 {
 	static const char *dhclient_paths[] = {
-		"/sbin/dhclient",
-		"/usr/sbin/dhclient",
-		"/usr/pkg/sbin/dhclient",
-		"/usr/local/sbin/dhclient",
 		NULL
 	};
 	const char **path = dhclient_paths;
diff --git a/src/dhcp-manager/nm-dhcp-dhcpcd.c b/src/dhcp-manager/nm-dhcp-dhcpcd.c
index 237661f..48bc33f 100644
--- a/src/dhcp-manager/nm-dhcp-dhcpcd.c
+++ b/src/dhcp-manager/nm-dhcp-dhcpcd.c
@@ -51,10 +51,6 @@ const char *
 nm_dhcp_dhcpcd_get_path (const char *try_first)
 {
 	static const char *dhcpcd_paths[] = {
-		"/sbin/dhcpcd",
-		"/usr/sbin/dhcpcd",
-		"/usr/pkg/sbin/dhcpcd",
-		"/usr/local/sbin/dhcpcd",
 		NULL
 	};
 	const char **path = dhcpcd_paths;
diff --git a/src/dns-manager/nm-dns-bind.c b/src/dns-manager/nm-dns-bind.c
index 1a3243b..a47dccd 100644
--- a/src/dns-manager/nm-dns-bind.c
+++ b/src/dns-manager/nm-dns-bind.c
@@ -51,9 +51,7 @@ static inline const char *
 find_bind (void)
 {
 	static const char *paths[] = {
-		"/usr/local/sbin/named",
-		"/usr/sbin/named",
-		"/sbin/named",
+		"@bind@/sbin/named",
 		NULL
 	};
 	const char **binary = paths;
diff --git a/src/dns-manager/nm-dns-dnsmasq.c b/src/dns-manager/nm-dns-dnsmasq.c
index 8e216f4..6e00210 100644
--- a/src/dns-manager/nm-dns-dnsmasq.c
+++ b/src/dns-manager/nm-dns-dnsmasq.c
@@ -52,9 +52,7 @@ static inline const char *
 find_dnsmasq (void)
 {
 	static const char *paths[] = {
-		"/usr/local/sbin/dnsmasq",
-		"/usr/sbin/dnsmasq",
-		"/sbin/dnsmasq",
+		"@dnsmasq@/bin/dnsmasq",
 		NULL
 	};
 	const char **binary = paths;
diff --git a/src/dnsmasq-manager/nm-dnsmasq-manager.c b/src/dnsmasq-manager/nm-dnsmasq-manager.c
index ca2f9dc..ce718d0 100644
--- a/src/dnsmasq-manager/nm-dnsmasq-manager.c
+++ b/src/dnsmasq-manager/nm-dnsmasq-manager.c
@@ -170,9 +170,7 @@ static inline const char *
 nm_find_dnsmasq (void)
 {
 	static const char *dnsmasq_binary_paths[] = {
-		"/usr/local/sbin/dnsmasq",
-		"/usr/sbin/dnsmasq",
-		"/sbin/dnsmasq",
+		"@dnsmasq@/bin/dnsmasq",
 		NULL
 	};
 
diff --git a/src/nm-device.c b/src/nm-device.c
index 1dc94ee..e60f3c8 100644
--- a/src/nm-device.c
+++ b/src/nm-device.c
@@ -1321,8 +1321,7 @@ aipd_start (NMDevice *self, NMDeviceStateReason *reason)
 	char *argv[6], *cmdline;
 	const char **aipd_binary = NULL;
 	static const char *aipd_paths[] = {
-		"/usr/sbin/avahi-autoipd",
-		"/usr/local/sbin/avahi-autoipd",
+		"@avahi@/sbin/avahi-autoipd",
 		NULL
 	};
 	int i = 0;
@@ -2555,7 +2554,7 @@ share_init (void)
 	}
 
 	for (iter = modules; *iter; iter++) {
-		char *argv[3] = { "/sbin/modprobe", *iter, NULL };
+		char *argv[3] = { "/var/run/current-system/sw/sbin/modprobe", *iter, NULL };
 		char *envp[1] = { NULL };
 		GError *error = NULL;
 
diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c
index 59698c3..7dba0f7 100644
--- a/src/ppp-manager/nm-ppp-manager.c
+++ b/src/ppp-manager/nm-ppp-manager.c
@@ -661,9 +661,7 @@ static inline const char *
 nm_find_pppd (void)
 {
 	static const char *pppd_binary_paths[] = {
-		"/usr/local/sbin/pppd",
-		"/usr/sbin/pppd",
-		"/sbin/pppd",
+		"@ppp@/sbin/pppd",
 		NULL
 	};
 
@@ -988,7 +986,7 @@ nm_ppp_manager_start (NMPPPManager *manager,
 
 	/* Make sure /dev/ppp exists (bgo #533064) */
 	if (stat ("/dev/ppp", &st) || !S_ISCHR (st.st_mode))
-		ignored = system ("/sbin/modprobe ppp_generic");
+		ignored = system ("/var/run/current-system/sw/sbin/modprobe ppp_generic");
 
 	connection = nm_act_request_get_connection (req);
 	g_assert (connection);