summary refs log tree commit diff
path: root/pkgs/development/tools/misc/lttng-tools/lttng-change-modprobe-path-from-sbin-modprobe-to-modprobe.patch
blob: 7d9edbda97aef7f4c34be86c35ec303c164e6b5a (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
From daba2e936571a236817022b760d91c48b730c30b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= <bjorn.forsman@gmail.com>
Date: Tue, 9 Jul 2013 23:47:47 +0200
Subject: [PATCH] Change modprobe path from "/sbin/modprobe" to "modprobe"
 (rely on PATH lookup)

---
 src/bin/lttng-sessiond/modprobe.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/bin/lttng-sessiond/modprobe.c b/src/bin/lttng-sessiond/modprobe.c
index 7e06dad..4075efe 100644
--- a/src/bin/lttng-sessiond/modprobe.c
+++ b/src/bin/lttng-sessiond/modprobe.c
@@ -90,7 +90,7 @@ void modprobe_remove_lttng_control(void)
 
 	for (i = ARRAY_SIZE(kern_modules_control) - 1; i >= 0; i--) {
 		ret = snprintf(modprobe, sizeof(modprobe),
-				"/sbin/modprobe -r -q %s",
+				"modprobe -r -q %s",
 				kern_modules_control[i].name);
 		if (ret < 0) {
 			PERROR("snprintf modprobe -r");
@@ -125,7 +125,7 @@ void modprobe_remove_lttng_data(void)
 
 	for (i = ARRAY_SIZE(kern_modules_list) - 1; i >= 0; i--) {
 		ret = snprintf(modprobe, sizeof(modprobe),
-				"/sbin/modprobe -r -q %s",
+				"modprobe -r -q %s",
 				kern_modules_list[i].name);
 		if (ret < 0) {
 			PERROR("snprintf modprobe -r");
@@ -169,7 +169,7 @@ int modprobe_lttng_control(void)
 
 	for (i = 0; i < ARRAY_SIZE(kern_modules_control); i++) {
 		ret = snprintf(modprobe, sizeof(modprobe),
-				"/sbin/modprobe %s%s",
+				"modprobe %s%s",
 				kern_modules_control[i].required ? "" : "-q ",
 				kern_modules_control[i].name);
 		if (ret < 0) {
@@ -205,7 +205,7 @@ int modprobe_lttng_data(void)
 
 	for (i = 0; i < ARRAY_SIZE(kern_modules_list); i++) {
 		ret = snprintf(modprobe, sizeof(modprobe),
-				"/sbin/modprobe %s%s",
+				"modprobe %s%s",
 				kern_modules_list[i].required ? "" : "-q ",
 				kern_modules_list[i].name);
 		if (ret < 0) {
-- 
1.8.2.3