blob: c60c205f9cfc657358eb43fa38268dc245a1a758 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/sh
cmd="$(basename "$0")"
HPACUCLI_BASEDIR="/opt/hp/hpacucli"
HPACUCLI_LOCKDIR="/var/lock/$cmd"
HPACUCLI_LOCK="${HPACUCLI_LOCKDIR}/CPQACU_MUTEX"
HPACUCLI_BIN="${HPACUCLI_BASEDIR}/$cmd.bin"
if pgrep -x "$cmd.bin"; then
echo "Another instance of $cmd is running! Stop it first."
exit 1
fi
if ! [ -f "${HPACUCLI_LOCK}" ]; then
mkdir -p -m 700 "${HPACUCLI_LOCKDIR}"
touch "${HPACUCLI_LOCK}"
fi
export LD_LIBRARY_PATH="${HPACUCLI_BASEDIR}"
export ACUXE_LOCK_FILES_DIR="${HPACUCLI_LOCKDIR}/"
exec setarch `uname -m` --uname-2.6 "${HPACUCLI_BIN}" "${@}"
|