From 66522c9547575495d2d36ee0f3d030ef502aeba6 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Tue, 8 Jun 2010 11:18:12 +0200 Subject: 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 [Closes: #582858] Signed-off-by: Michael Prokop --- hook-functions | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'hook-functions') 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 -- cgit v1.2.3