diff options
author | Michael Prokop <mika@debian.org> | 2010-06-08 11:18:12 +0200 |
---|---|---|
committer | Michael Prokop <mika@debian.org> | 2010-06-08 11:18:12 +0200 |
commit | 66522c9547575495d2d36ee0f3d030ef502aeba6 (patch) | |
tree | dea01d1986831a7c6425f948c5fa9ab4fdc2d1df /hook-functions | |
parent | 90d76d566f7597d9826606b8b5cec62b50c44096 (diff) | |
download | initramfs-tools-66522c9547575495d2d36ee0f3d030ef502aeba6.tar.gz initramfs-tools-66522c9547575495d2d36ee0f3d030ef502aeba6.zip |
dep_add_modules(): handle ubifs and return since ubifs root is a char device
Add additional check to handle ubifs and return since
ubifs root is a char device but most of the following
commands in dep_add_modules() only work with block
devices.
Patch by Martin Michlmayr <tbm@cyrius.com>
[Closes: #582858]
Signed-off-by: Michael Prokop <mika@debian.org>
Diffstat (limited to 'hook-functions')
-rw-r--r-- | hook-functions | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hook-functions b/hook-functions index 8bebdea..6a6e233 100644 --- a/hook-functions +++ b/hook-functions @@ -226,6 +226,14 @@ dep_add_modules() # findout root block device + fstype eval "$(mount | awk '/\/dev\// {if ($3 == "/") {print "root=" $1 "\nFSTYPE=" $5; exit}}')" + + # handle ubifs and return since ubifs root is a char device but + # most of the commands below only work with block devices. + if [ "${FSTYPE}" = "ubifs" ]; then + manual_add_modules "${FSTYPE}" + return + fi + if [ "${root}" = "/dev/root" ] ; then root="/dev/disk/by-uuid/"$(blkid -o value -s UUID ${root}) 2>/dev/null fi |