Tests: remove declaration already present in utils.sh
[lttng-tools.git] / extras / core-handler / handler.sh
index 781728223bd64b50355a022bc0cf8d24a1348e5c..1725a436fc4bd1e3ff8955d4cde094b4df16eaa4 100755 (executable)
@@ -21,7 +21,6 @@
 CAT_BIN="cat"
 PGREP_BIN="pgrep"
 MKDIR_BIN="mkdir"
-LTTNG_BIN="lttng"
 
 # Session name
 SESSION_NAME="coredump-handler"
@@ -29,6 +28,12 @@ SESSION_NAME="coredump-handler"
 # Sessiond binary name.
 SESSIOND_BIN_NAME="lttng-sessiond"
 
+# TODO: Checking for a sessiond lockfile would be more appropriate.
+if $PGREP_BIN -u root "${SESSIOND_BIN_NAME}" > /dev/null 2>&1
+then
+    $LTTNG_BIN snapshot record -s ${SESSION_NAME} > /dev/null 2>&1
+fi
+
 # Core file settings.
 CORE_PATH="/tmp/lttng/core"
 CORE_PREFIX="core"
@@ -54,9 +59,3 @@ $CAT_BIN - > "${CORE_PATH}/${CORE_PREFIX}.$p"
 
 # Optional, chain core dump handler with original systemd script.
 #$CAT_BIN - | /usr/lib/systemd/systemd-coredump $p $u $g $s $t $e
-
-# TODO: Checking for a sessiond lockfile would be more appropriate.
-if $PGREP_BIN -u root "${SESSIOND_BIN_NAME}" > /dev/null 2>&1
-then
-    $LTTNG_BIN snapshot record -s ${SESSION_NAME} > /dev/null 2>&1
-fi
This page took 0.024408 seconds and 5 git commands to generate.