summaryrefslogtreecommitdiff
path: root/scripts/ipmiutil.pre
diff options
context:
space:
mode:
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