#!/bin/sh
# Make sure filesystems are available.
set -e

# Make sure fuse is available for grub2-mount
# As long as we use grub2-mount, we use grub2's own file system modules
# to mount the partitiion and the operation don't require kernel support
# other than fuse.
if ! cat /proc/filesystems | grep nodev | cut -f2 | grep -qw fuse; then
	modprobe fuse 2>&1 | logger -t os-prober
fi

# Regarding file systems not supported by grub2, or systems simply don't
# have grub2-mount, will use linux 'mount' utility. This will require
# kernel file system module to work, but still we don't need to modprobe
# all of them before mount, because mount() syscall will take care of it
# by __request_module the needed kernel module and we should leave it do
# that for us in order to have only needed modules get loaded. 
#
# Still if you want any kernel module loaded, add them here.

