]> git.ipfire.org Git - thirdparty/dracut.git/commit
multipath: fix majmin_to_mpath_dev()
authorPekka Wallendahl <wyrmiyu@gmail.com>
Mon, 18 Jan 2016 18:28:22 +0000 (20:28 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 29 Feb 2016 10:43:18 +0000 (11:43 +0100)
commit851946468adf0bc80b9c66b10ae586449b51275f
tree8737b8d9490b2a25f39995bf86ee2a6dd8ad02dd
parent28665b4fa55f18760ade77602d69f892d86b0bbd
multipath: fix majmin_to_mpath_dev()

* Multipath device names only start with the mpath-prefix if the option
  use_userfriendly_names is set true in /etc/multipath.conf and if user
  has not set any aliases in the said file. Thus the for-loop should go
  through all files in /dev/mapper/, not just ones starting with 'mpath'

* Bash is perfectly capable to extend `/dev/mapper/*` notation without a
  need to pass it to an external ls

* Changed the function to use a local variable $_dev instead of the
  global $dev, which seemed to be the original intention as the local
  _dev was defined but not used

(cherry picked from commit 28058a2e373eb268d9b1cd5b65c2ad607961dad1)
modules.d/90multipath/module-setup.sh