home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / boot / i386 / rescue / sbin / mpath_id < prev    next >
Text File  |  2006-11-29  |  296b  |  20 lines

  1. #!/bin/sh
  2.  
  3. major=$1
  4. minor=$2
  5.  
  6. mpstatus=$(/sbin/dmsetup status -j $major -m $minor --target multipath)
  7. if [ -z "$mpstatus" ]; then
  8.     exit 1
  9. fi
  10.  
  11. mpid=$(/sbin/dmsetup info -c --noopencount --noheadings -o name -j $major -m $minor)
  12.  
  13. if [ -z "$mpid" ]; then
  14.     exit 1
  15. fi
  16. echo ID_MPATH=\"$mpid\"
  17.  
  18. exit 0
  19.  
  20.