#!/bin/sh
#
# 
is_fstab=/etc/is_fstab
while [ $# -gt 0 ]
do
	case "$1" in
		--is_fstab )
				is_fstab=$2
				shift
				;;
	esac
	shift
done

cat "$is_fstab" "${is_fstab}.d"/* | while read device mountpoint fstype options rest
do
	case "$device" in
		\#* )
			;;
		* )
			echo mount $device -o$options -t $fstype $mountpoint
			sudo mount $device -o$options -t $fstype $mountpoint
			;;
			
	esac
done
