void-packages/srcpkgs/oprofile/patches/opcontrol_hardcoded_path.patch

15 lines
557 B
Diff

Assume that which and dirname are found in PATH, don't harcode your custom PATH.
--- utils/opcontrol.orig 2011-12-16 16:32:00.405576367 +0100
+++ utils/opcontrol 2011-12-16 16:32:25.755959905 +0100
@@ -2156,8 +2156,8 @@ help_start_daemon_with_ibs()
# determine the location of opcontrol and related programs
if test -z "$OPDIR"; then
BINDIR="/usr/bin"
- OPCONTROL=`$BINDIR/which $0`
- OPDIR=`$BINDIR/dirname $OPCONTROL`
+ OPCONTROL=`which $0`
+ OPDIR=`dirname $OPCONTROL`
fi
PATH=$OPDIR:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin