diff -Naurp oprofile-0.9.3-orig/utils/opcontrol oprofile-0.9.3/utils/opcontrol
--- oprofile-0.9.3-orig/utils/opcontrol	2008-12-19 10:36:13.000000000 -0500
+++ oprofile-0.9.3/utils/opcontrol	2008-12-19 10:54:22.000000000 -0500
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # opcontrol is a script to control OProfile
 # opcontrol --help and opcontrol --list-events have info
@@ -908,7 +908,7 @@ do_stop()
 		return
 	fi
 
-	kill -s 0 `cat $LOCK_FILE` 2>/dev/null
+	kill -0 `cat $LOCK_FILE` 2>/dev/null
 	if test "$?" -ne 0; then
 		echo "Detected stale lock file. Removing." >&2
 		rm -f "$LOCK_FILE"
@@ -1649,7 +1649,8 @@ check_version()
 if test -z "$OPDIR"; then
 	BINDIR="/usr/bin"
 	OPCONTROL=`$BINDIR/which $0`
-	OPDIR=`$BINDIR/dirname $OPCONTROL`
+	DIRNAME=`which dirname`
+	OPDIR=`$DIRNAME $OPCONTROL`
 fi
 
 PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin
