diff options
-rw-r--r-- | hook-functions | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/hook-functions b/hook-functions index 8c90d37..c48416a 100644 --- a/hook-functions +++ b/hook-functions @@ -222,7 +222,11 @@ dep_add_modules() local block minor root FSTYPE root_dev_path x # findout root block device + fstype - eval "$(mount | awk '/ \/ / {print "root=" $1 "\nFSTYPE=" $5; exit}')" + eval "$(mount | awk '/\/dev\// {if ($3 == "/") {print "root=" $1 "\nFSTYPE=" $5; exit}}')" + if [ "${root}" = "/dev/root" ] ; then + root="/dev/disk/by-uuid/"$(/lib/udev/vol_id --uuid ${root}) 2>/dev/null + fi + root="$(readlink -f ${root})" # find out real rootfs on auto type if [ "${FSTYPE}" = "auto" ]; then |