summaryrefslogtreecommitdiff
path: root/multipath/02_multipath
diff options
context:
space:
mode:
Diffstat (limited to 'multipath/02_multipath')
-rwxr-xr-xmultipath/02_multipath34
1 files changed, 34 insertions, 0 deletions
diff --git a/multipath/02_multipath b/multipath/02_multipath
new file mode 100755
index 0000000..1a5d5a1
--- /dev/null
+++ b/multipath/02_multipath
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# store the multipath tool in the initrd
+# hotplug & udev will take care of calling it when appropriate
+# this tool is statically linked against klibc : no additional libs
+#
+cp /sbin/multipath $INITRDDIR/sbin
+cp /sbin/devmap_name $INITRDDIR/sbin
+cp /sbin/kpartx $INITRDDIR/sbin
+
+#
+# feed the dependencies too
+# scsi_id is dynamicaly linked, so store the libs too
+#
+cp /sbin/scsi_id $INITRDDIR/sbin
+cp /bin/mountpoint $INITRDDIR/bin
+
+PROGS="/sbin/scsi_id /bin/mountpoint"
+LIBS=`ldd $PROGS | grep -v linux-gate.so | sort -u | \
+awk '{print $3}'`
+for i in $LIBS
+do
+ mkdir -p `dirname $INITRDDIR/$i`
+ cp $i $INITRDDIR/$i
+done
+
+#
+# config file ?
+#
+if [ -f /etc/multipath.conf ]
+then
+ cp /etc/multipath.conf $INITRDDIR/etc/
+fi
+