summaryrefslogtreecommitdiff
path: root/dracut.sh
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2013-08-05 11:25:45 +0200
committerHarald Hoyer <harald@redhat.com>2013-08-07 10:33:14 +0200
commita4f7b504712bd7499d60d16f358ec89ab31bbb47 (patch)
tree3cf5c4d77564a6d77afe972dacc0208be8331775 /dracut.sh
parent226e3710b4236c69a8f821b6a5c53a264fe4892a (diff)
downloaddracut-a4f7b504712bd7499d60d16f358ec89ab31bbb47.tar.gz
dracut-a4f7b504712bd7499d60d16f358ec89ab31bbb47.tar.bz2
dracut-a4f7b504712bd7499d60d16f358ec89ab31bbb47.zip
dracut.sh/dracut-functions.sh: handle root on non-block device
Diffstat (limited to 'dracut.sh')
-rwxr-xr-xdracut.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/dracut.sh b/dracut.sh
index 3140b7ea..c35d771f 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -871,7 +871,10 @@ if [[ $hostonly ]]; then
do
mp=$(readlink -f "$mp")
mountpoint "$mp" >/dev/null 2>&1 || continue
- _dev="$(readlink -f "/dev/block/$(find_block_device "$mp")")"
+ _dev=$(find_block_device "$mp")
+ _bdev=$(readlink -f "/dev/block/$dev")
+ [[ -b $_bdev ]] && _dev=$_bdev
+ push host_devs $_dev
[[ "$_mp" == "/" ]] && root_dev="$_dev"
push host_devs "$_dev"
done