summaryrefslogtreecommitdiffstats
path: root/stp_check
diff options
context:
space:
mode:
Diffstat (limited to 'stp_check')
-rw-r--r--stp_check12
1 files changed, 7 insertions, 5 deletions
diff --git a/stp_check b/stp_check
index 0c49d3e7..8610d3ee 100644
--- a/stp_check
+++ b/stp_check
@@ -12,6 +12,8 @@ load_module()
if [ "$ret" -ne 0 ]
then
echo "$MODULE_NAME not in kernel and not built. Compiling..."
+ mkdir -p $MODULE_DIR
+ cp -dpr $SRC_DIR/* $MODULE_DIR
make -w -C $MODULE_DIR
if [ "$?" -ne 0 ]
then
@@ -28,9 +30,7 @@ load_module()
fi
}
-VAR_DIR=${prefix}/var/lib/systemtap
-RELAYFS_DIR=$VAR_DIR/relayfs
-STP_CONTROL_DIR=$VAR_DIR/transport
+VAR_DIR=${prefix}/var/cache/systemtap
RELAYFS=`grep " relayfs_poll" /boot/System.map-\`uname -r\``
if [ -z "$RELAYFS" ]
@@ -39,8 +39,9 @@ then
if [ -z "$RELAYFS" ]
then
MODULE_NAME=relayfs
- MODULE_DIR=$RELAYFS_DIR
+ MODULE_DIR=$VAR_DIR/relayfs
MODULE=$MODULE_DIR/relayfs.ko
+ SRC_DIR=${prefix}/share/systemtap/runtime/relayfs
load_module
fi
fi
@@ -60,8 +61,9 @@ STP_CONTROL=`lsmod | grep stp_control |awk '{print $1}'`
if [ "$STP_CONTROL" != "stp_control" ]
then
MODULE_NAME=stp-control
- MODULE_DIR=$STP_CONTROL_DIR
+ MODULE_DIR=$VAR_DIR/transport
MODULE=$MODULE_DIR/stp-control.ko
+ SRC_DIR=${prefix}/share/systemtap/runtime/transport
load_module
fi