nixpkgs/pkgs/development/tools/misc/lttng-tools/lttng-change-modprobe-path-from-sbin-modprobe-to-modprobe.patch
Bjørn Forsman 6a4f068b9e lttng-tools: new package
This is the Linux Trace Toolkit. Included in this package:

Command-line client:
  lttng
Tracing daemons:
  lttng-sessiond (automatically started by lttng)
  lttng-relayd   (remote trace collection daemon)

Userspace tracing can be done by using liblttng-ust. To do kernel
tracing we also need the LTTng kernel modules.

I've added a patch that changes "/sbin/modprobe" to just "modprobe".
2013-08-10 14:32:57 +02:00

54 lines
1.8 KiB
Diff

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