The idea behind this was not that I am too lazy to look up the correct mount command to mount a directory. (Don't get me wrong, I am incredibly lazy) But that I had a couple of projects that would need to mount a variety of devices and files without knowing what exact the source was before-hand. I really wanted to call this project mount.auto, but there is already a project called autofs and I am neither creative enough to think of a better name, nor find a good synonym for "auto".
Basically I needed a All-in-one solution that would do the following:
Don't get me wrong, I completely agree that this could lead to problems! And that you should always mount persistent devices and filesystems with specific and non-ambiguous mount commands! However as I said before this was for a couple very specific projects which require users to mount remote Windows/Novell shares and local read-only file images. So I can tell myself that the risk is mitigated
The complete code is below, but to begin with I needed to find the code necessary to mount all the various options:
Code to mount a FAT device
mount -t vfat /dev/hda1 /mnt/mountpoint
or an /etc/fstab entry
/dev/hda1 /mnt/mountpoint vfat