summaryrefslogtreecommitdiff
path: root/scripts/ipmiutil.pre
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/ipmiutil.pre
Imported Upstream version 2.9.3upstream/2.9.3
Diffstat (limited to 'scripts/ipmiutil.pre')
-rwxr-xr-xscripts/ipmiutil.pre12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/ipmiutil.pre b/scripts/ipmiutil.pre
new file mode 100755
index 0000000..a059dcc
--- /dev/null
+++ b/scripts/ipmiutil.pre
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# Before starting an ipmiutil service, make sure we have a driver loaded,
+# since running driverless for multi-user is not supported.
+/usr/bin/ipmiutil cmd -k 2>/dev/null |grep "driverless" >/dev/null 2>&1
+if [ $? -eq 0 ]; then
+ rv=1
+ echo "No Linux IPMI driver loaded, aborting."
+else
+ rv=0
+fi
+exit $rv