Random Project

minor updates to make work with CIFS

We use Windows shared folders to mount as CIFS shares on our Linux servers for backups. The below modifications where made to get it working for our CIFS mount points. Overall, the script works as advertised, and I have tested (CentOS 5) to confirm the script properly errors when mount is not attached or if folder is moved.

CHANGES:
1. Since our mounts are CIFS, we changed all occurrences of “nfs” to “cifs”.

2. Commented out section checking fstab. I would prefer to see this as a function in the script and have it be an optional check if the mount point is in fstab.
commented out:
# awk ‘{if ($3==”cifs”){print $2}}’ /etc/fstab | grep -q ${MP} &>/dev/null
# if [ $? -ne 0 ]; then
# log “WARN: ${MP} don’t exists in /etc/fstab”
# ERR_MESG[${#ERR_MESG[*]}]=”${MP} don’t exists in /etc/fstab”
# fi