]> git.ipfire.org Git - thirdparty/dracut.git/commit
ismounted fix
authorDave Young <dyoung@redhat.com>
Mon, 17 Sep 2012 10:01:03 +0000 (18:01 +0800)
committerHarald Hoyer <harald@redhat.com>
Wed, 19 Sep 2012 16:37:07 +0000 (18:37 +0200)
commitd9a7ea5b438125ac1c8cf0d19c5f0b38fd21bbe9
tree067aec88dc4996cf00cc80be4f547717fe974ef2
parent914f531f3955e8416e6098c094a1356a0e7c9d81
ismounted fix

ismounted handles both find-by-dev and find-by-mnt, but there's two issues:
1. for find-by-dev, it use readlink to get the canonical dev name, but
   lvm is different with other devices, the canonical name for lvm devices
   are symlinks like /dev/mapper/vg-lv00
2. for nfs mounting, just use [ -b $dev ] is not enough, it need being handled
   seperately.

Per Karel Zak's suggestion, findmnt util is suitable for this purpose, it
handles these cases well, so just use findmnt instead of implement all the
logic by ourselves. Thanks, Karel.

Signed-off-by: Dave Young <dyoung@redhat.com>
modules.d/99base/dracut-lib.sh
modules.d/99base/module-setup.sh