Check to see if share is mounted
Matthias Apitz
guru at unixarea.de
Tue Oct 29 11:49:11 UTC 2013
El día Tuesday, October 29, 2013 a las 07:40:19AM -0400, Jerry escribió:
> I have several Bash scripts that backup data to a Windows drive. I am
> looking for a one or two line snippet of code that I can use to
> determine if the share is all ready mounted. I tried trapping the exit
> code of the "mount_smbfs" command, but it always returns "0". Is there
> another way to get info on the share?
test -f /mnt/..... || {
echo PANIC
exit
}
--
Sent from my FreeBSD netbook
Matthias Apitz, <guru at unixarea.de>, http://www.unixarea.de/ f: +49-170-4527211
UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370)
UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5
More information about the freebsd-questions
mailing list