[multipath] set devmap UUID to multipath WWID
[platform/upstream/multipath-tools.git] / multipath / 02_multipath
1 #!/bin/sh
2 #
3 # store the multipath tool in the initrd
4 # hotplug & udev will take care of calling it when appropriate
5 # this tool is statically linked against klibc : no additional libs
6 #
7 cp /sbin/multipath $INITRDDIR/sbin
8 cp /sbin/devmap_name $INITRDDIR/sbin
9 cp /sbin/kpartx $INITRDDIR/sbin
10
11 #
12 # feed the dependencies too
13 # scsi_id is dynamicaly linked, so store the libs too
14 #
15 cp /sbin/scsi_id $INITRDDIR/sbin
16 cp /bin/mountpoint $INITRDDIR/bin
17
18 PROGS="/sbin/scsi_id /bin/mountpoint"
19 LIBS=`ldd $PROGS | grep -v linux-gate.so | sort -u | \
20 awk '{print $3}'` 
21 for i in $LIBS
22 do
23         mkdir -p `dirname $INITRDDIR/$i`
24         cp $i $INITRDDIR/$i
25 done
26
27 #
28 # config file ?
29 #
30 if [ -f /etc/multipath.conf ]
31 then
32         cp /etc/multipath.conf $INITRDDIR/etc/
33 fi
34