summaryrefslogtreecommitdiffstats
path: root/run-staprun.in
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2009-05-21 16:57:04 -0500
committerDavid Smith <dsmith@redhat.com>2009-05-21 16:57:04 -0500
commitc8e9eb18d8d13d099a4a177fe53de507c1d9ce8b (patch)
treeab2388afb795ed1a7ead2fbbf8b9d1b368a8231f /run-staprun.in
parentdd9a3bcbef65bde65491d959e9458bc641924811 (diff)
parent3863e7999255deeaa7f8f4bba7df893773812537 (diff)
downloadsystemtap-steved-c8e9eb18d8d13d099a4a177fe53de507c1d9ce8b.tar.gz
systemtap-steved-c8e9eb18d8d13d099a4a177fe53de507c1d9ce8b.tar.xz
systemtap-steved-c8e9eb18d8d13d099a4a177fe53de507c1d9ce8b.zip
Merge commit 'origin/master' into pr7043
Conflicts: runtime/print.c runtime/transport/transport.c runtime/transport/transport_msgs.h
Diffstat (limited to 'run-staprun.in')
-rw-r--r--run-staprun.in24
1 files changed, 24 insertions, 0 deletions
diff --git a/run-staprun.in b/run-staprun.in
new file mode 100644
index 00000000..e0615556
--- /dev/null
+++ b/run-staprun.in
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+srcdir='@abs_top_srcdir@'
+builddir='@abs_top_builddir@'
+
+rundir="${0%/*}"
+[ "$rundir" == "$0" ] || builddir="$rundir"
+
+# Absolutify the paths.
+case "$srcdir" in
+/*) ;;
+*) srcdir=`cd "$srcdir" && pwd` || exit ;;
+esac
+case "$builddir" in
+/*) ;;
+*) builddir=`cd "$builddir" && pwd` || exit ;;
+esac
+
+exec sudo -P "SYSTEMTAP_STAPIO=${builddir}/stapio" \
+ "SYSTEMTAP_STAPRUN=${builddir}/run-staprun" \
+ "SYSTEMTAP_RUNTIME=${srcdir}/runtime" \
+ "SYSTEMTAP_REAL_UID=`id -ru`" \
+ "SYSTEMTAP_REAL_GID=`id -rg`" \
+ ${builddir}/staprun ${1+"$@"}