From c06a144a66ec24b9e2b4fd52c9abd655f352f685 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 5 Nov 2011 20:05:16 -0400 Subject: 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 --- init_functions | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'init_functions') 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: -- cgit v1.2.3-24-g4f1b