summaryrefslogtreecommitdiff
path: root/sys-block/hpssacli/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-block/hpssacli/files
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-block/hpssacli/files')
-rw-r--r--sys-block/hpssacli/files/hpssacli-wrapper22
1 files changed, 22 insertions, 0 deletions
diff --git a/sys-block/hpssacli/files/hpssacli-wrapper b/sys-block/hpssacli/files/hpssacli-wrapper
new file mode 100644
index 000000000000..2e425f719e20
--- /dev/null
+++ b/sys-block/hpssacli/files/hpssacli-wrapper
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+#
+# Uncomment the line below to turn off discovery of Fibre
+# export INFOMGR_BYPASS_FIBRE=1
+#
+# Uncomment the lines below to turn off discovery of Non-Smart Array controllers
+# export INFOMGR_BYPASS_NONSA=1
+#
+
+cmd="$(basename "$0")"
+
+HPSSACLI_BASEDIR="/opt/hp/hpssacli"
+HPSSACLI_BIN="${HPSSACLI_BASEDIR}/${cmd}.bin"
+
+if pgrep --exact "${cmd}.bin" 1>/dev/null; then
+ echo "Another instance of ${cmd} is running! Stop it first."
+ exit 1
+fi
+
+export LD_LIBRARY_PATH="${HPSSACLI_BASEDIR}"
+"${HPSSACLI_BIN}" "${@}"