# moo and unmoo mount the local folders i use most.
alias moo='check_mount /z/stuffing ; check_mount /z/walrus ; check_mount /z/chunky ; check_mount /z/fredgrid'
-alias unmoo='umount /z/stuffing ; umount /z/walrus ; umount /z/chunky ; umount /z/fredgrid'
+alias unmoo='sudo umount /z/stuffing ; sudo umount /z/walrus ; sudo umount /z/chunky ; sudo umount /z/fredgrid'
# cleans up the ownership for all my files.
#moved alias refred='(chown -R fred:fred /home/fred /home/games /home/archives ; normal_perm /var/log )'
#!/bin/bash
+# check_mount: tests a mount point to see if it is already mounted, and if
+# it is not, mounts it.
if [ -z "$1" ]; then
echo This program needs a mount point as a parameter. If the mount point is not
echo already mounted, then the program will attempt to mount it.
fi
if [ -z "$(mount | grep "$1")" ]; then
- mount "$1"
+ sudo mount "$1"
fi