multipath-tools: update scsi_id arguments
[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/kpartx $INITRDDIR/sbin
9
10 #
11 # feed the dependencies too
12 # scsi_id is dynamicaly linked, so store the libs too
13 #
14 cp /lib/udev/scsi_id $INITRDDIR/lib/udev/
15 cp /bin/mountpoint $INITRDDIR/bin
16
17 PROGS="/lib/udev/scsi_id /bin/mountpoint"
18 LIBS=`ldd $PROGS | grep -v linux-gate.so | sort -u | \
19 awk '{print $3}'` 
20 for i in $LIBS
21 do
22         mkdir -p `dirname $INITRDDIR/$i`
23         cp $i $INITRDDIR/$i
24 done
25
26 #
27 # config file ?
28 #
29 if [ -f /etc/multipath.conf ]
30 then
31         cp /etc/multipath.conf $INITRDDIR/etc/
32 fi
33