summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfram Schlich <wschlich@gentoo.org>2008-12-01 16:04:54 +0000
committerWolfram Schlich <wschlich@gentoo.org>2008-12-01 16:04:54 +0000
commit4ba2de68e7721619dbf1b700fa677ba998185deb (patch)
treea32551ef629c7c2548a0978ed8bb6ca986d95318 /sys-block/dellmgr/files
parentMarking jhead-2.84-r1 ppc64 for bug 243238 (diff)
downloadhistorical-4ba2de68e7721619dbf1b700fa677ba998185deb.tar.gz
historical-4ba2de68e7721619dbf1b700fa677ba998185deb.tar.bz2
historical-4ba2de68e7721619dbf1b700fa677ba998185deb.zip
add support for newer kernels (see bug #233295)
Package-Manager: portage-2.2_rc13/cvs/Linux 2.6.24-gentoo-r5-1 i686
Diffstat (limited to 'sys-block/dellmgr/files')
-rwxr-xr-xsys-block/dellmgr/files/dellmgr-r224
1 files changed, 24 insertions, 0 deletions
diff --git a/sys-block/dellmgr/files/dellmgr-r2 b/sys-block/dellmgr/files/dellmgr-r2
new file mode 100755
index 000000000000..907a1168e37f
--- /dev/null
+++ b/sys-block/dellmgr/files/dellmgr-r2
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# Get the major number of the megadev ioctl device node
+megadev_major=$(egrep '[[:space:]]megadev(_legacy)?$' /proc/devices 2>/dev/null | awk '{print $1}' 2>/dev/null)
+megadev_node=/dev/megadev0
+
+# MegaRAID device node major number found
+if [ -z "${megadev_major}" ]; then
+ echo "ERROR: failed to determine device node major number"
+ exit 1
+fi
+if [ -e "${megadev_node}" ]; then
+ if ! rm -f "${megadev_node}"; then
+ echo "ERROR: failed to remove existing device node ${megadev_node}"
+ exit 1
+ fi
+fi
+if ! mknod "${megadev_node}" c "${megadev_major}" 0; then
+ echo "ERROR: failed to create device node ${megadev_node}"
+ exit 1
+fi
+
+# Start the real dellmgr binary
+"${0%/*}/dellmgr.bin" "${@}"