From 9ef825cedd8228957f9bdd8df7ae543afd7e0001 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 11 Jul 2010 22:26:41 -0400 Subject: mkinitcpio: mount real root device instead of symlink If a symlink such as /dev/disk/by-uuid/xxxxx is provided on the kernel cmdline, resolve it and mount that device instead of the symlink. This prevents some ugliness in the output of commands such as mount or df. Signed-off-by: Dave Reisner --- init_functions | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init_functions b/init_functions index 1ae844b..37b9ebb 100644 --- a/init_functions +++ b/init_functions @@ -93,5 +93,8 @@ default_mount_handler() { else rwopt="ro" fi + if [ -L "${root}" ]; then + root=$(readlink -f "${root}") + fi mount ${fstype:+-t ${fstype}} -o ${rwopt}${rootflags:+,${rootflags}} "${root}" "$1" } -- cgit v1.2.3-24-g4f1b