]> sourceware.org Git - systemtap.git/commitdiff
initscript: copy uprobes.ko to cache directory
authorStefan Hajnoczi <stefanha@redhat.com>
Wed, 3 Sep 2014 21:40:11 +0000 (17:40 -0400)
committerJonathan Lebon <jlebon@redhat.com>
Wed, 3 Sep 2014 21:40:11 +0000 (17:40 -0400)
If the uprobes.ko module was built then it will be needed at staprun
time.  Copy the module into the cache directory alongside compiled
scripts.

initscript/systemtap.in

index 2d770e41ef34830ef6fbb7ea8a8961dbb31842d1..ebd28e44da128e157750e2f062437cdaab523418 100755 (executable)
@@ -403,6 +403,8 @@ get_compile_opts () { # opts
        skip=1 ;;
     -h|-V|-k|-F)
       ;;
+    -u)
+      echo -n "--save-uprobes " ;;
     *)
       echo -n $o" " ;;
     esac
@@ -491,6 +493,13 @@ compile_script () { # script checkcache
   pushd "$tmpdir" &> /dev/null
   logex $STAP -m "$1" -p4 -r $KRELEASE $opts "$f"
   ret=$?
+  if [ $ret -eq 0 ]; then
+    if [ -f "uprobes/uprobes.ko" ]; then
+      logex mkdir -p "$CACHE_PATH/uprobes"
+      logex mv "uprobes/uprobes.ko" "$CACHE_PATH/uprobes/"
+      ret=$?
+    fi
+  fi
   if [ $ret -eq 0 ]; then
     $UNAME -a > "$1.opts"
     echo $opts >> "$1.opts"
This page took 0.027941 seconds and 5 git commands to generate.