summaryrefslogtreecommitdiffstats
path: root/init_functions
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-11-06 01:05:16 +0100
committerDave Reisner <dreisner@archlinux.org>2011-11-15 01:11:09 +0100
commitc06a144a66ec24b9e2b4fd52c9abd655f352f685 (patch)
tree4fbf2dc8a3c9b71118a22c3c41faa7f521c84638 /init_functions
parent0d46d5cdd93ad1086ceb023876d3d071f3148db7 (diff)
downloadmkinitcpio-c06a144a66ec24b9e2b4fd52c9abd655f352f685.tar.gz
mkinitcpio-c06a144a66ec24b9e2b4fd52c9abd655f352f685.tar.xz
init: use util-linux's /bin/mount
Providing this means we no longer need blkid for FS detection, as mount will do this for us. Adds a slight bloat to the image, in exchange for a huge convenience. Messaging is changed to assume that /bin/mount will provide useful feedback for us on failure. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'init_functions')
-rw-r--r--init_functions15
1 files changed, 2 insertions, 13 deletions
diff --git a/init_functions b/init_functions
index 7dd0968..33a749f 100644
--- a/init_functions
+++ b/init_functions
@@ -117,23 +117,12 @@ default_mount_handler() {
msg "Trying to continue (this will most likely fail) ..."
fi
fi
- # We didn't build filesystem support into busybox,
- # instead we use util-linux's blkid for best compatibility
- fstype=${rootfstype:-$(blkid -u filesystem -o value -s TYPE -p "$root")}
- if [ -z "$fstype" ]; then
- err "Unable to determine the file system type of ${root}:"
- echo "Either it contains no filesystem, an unknown filesystem,"
- echo "or more than one valid file system signature was found."
- echo
- echo "Try adding"
- echo " rootfstype=your_filesystem_type"
- echo "to the kernel command line."
- echo
+
+ if ! mount ${fstype:+-t $fstype} -o ${rwopt:-ro}${rootflags:+,$rootflags} "$root" "$1"; then
echo "You are now being dropped into an emergency shell."
launch_interactive_shell
msg "Trying to continue (this will most likely fail) ..."
fi
- mount ${fstype:+-t $fstype} -o ${rwopt:-ro}${rootflags:+,$rootflags} "$root" "$1"
}
# vim: set ft=sh ts=4 sw=4 et: