[arch-projects] [mkinitcpio][PATCH 08/11] init_functions: move root resolution to separate function

Dave Reisner d at falconindy.com
Fri Nov 11 21:55:18 EST 2011


Signed-off-by: Dave Reisner <dreisner at archlinux.org>
---
 init_functions |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/init_functions b/init_functions
index 33a749f..ff21b42 100644
--- a/init_functions
+++ b/init_functions
@@ -74,7 +74,7 @@ parse_cmdline() {
     done
 }
 
-default_mount_handler() {
+resolve_device() {
     # resolve tag name to block device
     if [ "${root:0:5}" = 'UUID=' ] || [ "${root:0:6}" = 'LABEL=' ]; then
         device=$(blkid -l -t "$root" -o device)
@@ -117,6 +117,10 @@ default_mount_handler() {
             msg "Trying to continue (this will most likely fail) ..."
         fi
     fi
+}
+
+default_mount_handler() {
+    resolve_device
 
     if ! mount ${fstype:+-t $fstype} -o ${rwopt:-ro}${rootflags:+,$rootflags} "$root" "$1"; then
         echo "You are now being dropped into an emergency shell."
-- 
1.7.7.3



More information about the arch-projects mailing list