From 854b285e70b21321d8c29aa3548dca9de8e08b6a Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 5 Nov 2011 20:57:13 -0400 Subject: init_functions: move root resolution to separate function Signed-off-by: Dave Reisner --- init_functions | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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." -- cgit v1.2.3-24-g4f1b