esac
}
+# test if file system is supported, skip if not
+function test_fs
+{
+ for i in $* ; do
+ # translate file system names to actual module names
+ case $i in
+ ext4* ) fs="ext4dev" ;;
+ nfs4 ) fs=$i ;;
+ nfs* ) fs="nfs" ;;
+ * ) fs=$i ;;
+ esac
+ # see if f/s is already supported
+ egrep -q "[^a-z]$fs$" /proc/filesystems && return 0
+ # otherwise try to load the module and ...
+ modprobe $fs 2> /dev/null
+ # try one more time to see if f/s is supported
+ egrep -q "[^a-z]$fs$" /proc/filesystems && return 0
+ # else exit, ignoring unsupported file system
+ echo -e -n "\033[1;31m"
+ echo -e -n "File system $fs is not supported in this kernel (`uname -r`)"
+ echo "\033[m\a"
+ sleep 1
+ exit 0
+ done
+}
+
export PATH=../../unionfs-utils:$PATH
LINEBRK="----------------------------------------------------------------------"
exit 1
fi
+ # test if file systems are supported by this kernel, and skip if not
+ test_fs $MYFS $FS0 $FS1 $FS2 $FS3 $SPECIAL_FS
+
delay=$DELAY
echo "Sleeping for "$delay" seconds between each command."
setup_lower