summaryrefslogtreecommitdiff
path: root/scripts/setlib.sh
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-07-06 18:04:32 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-07-06 18:04:32 +0200
commita7f89980e5b3f4b9a74c70dbc5ffe8aabd28be28 (patch)
tree41c4deec1fdfbafd7821b4ca7a9772ac0abd92f5 /scripts/setlib.sh
Imported Upstream version 2.9.3upstream/2.9.3
Diffstat (limited to 'scripts/setlib.sh')
-rwxr-xr-xscripts/setlib.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/scripts/setlib.sh b/scripts/setlib.sh
new file mode 100755
index 0000000..eca184e
--- /dev/null
+++ b/scripts/setlib.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+# setup sequence for ipmiutil
+#
+# Resolve whatever libcrypto.so is present to the one that ipmiutil
+# was built to reference.
+# The default build on RHEL4.4 references libcrypto.so.4
+libver=4
+found=0
+
+# check where the libcrypto.so is located
+dirs="/usr/lib64 /lib64 /usr/lib /lib"
+for d in $dirs
+do
+ libt=`ls $d/libcrypto.so.0.* 2>/dev/null |tail -n1`
+ if [ "x$libt" != "x" ]; then
+ # Found a libcrypto.so
+ libcry=$libt
+ libdir=$d
+ found=1
+ libnew=$libdir/libcrypto.so.$libver
+ echo "libcry=$libcry libdir=$libdir libnew=$libnew"
+ if [ ! -f $libnew ]; then
+ # Need a sym-link to resolve it
+ echo "ln -s $libcry $libnew"
+ ln -s $libcry $libnew
+ ldconfig
+ fi
+ fi
+done
+
+if [ $found -eq 0 ]; then
+ echo "libcrypto.so not found, install openssl rpm"
+ rv=1
+else
+ rv=0
+fi
+exit $rv
+