[PLUG] File test for _mounted_ CIF/SMB filesystem
Roderick A. Anderson
raanders at acm.org
Tue Jul 26 20:11:02 UTC 2005
On Tue, 26 Jul 2005, Eli Stair wrote:
> Try either autofs (4.x) or just a cron job or somesuch that does
> something along the lines of:
>
> cat /proc/mounts | grep smbfs | grep $MOUNTPOINT | grep -v grep >
> /dev/null || (MOUNT COMMAND)
This works great. And incase some brain-dead bozo developer ( me ) gets
on the system and mounts the file system then forgets to un-mount it;
this, based on your suggestion, works.
while $(cat /proc/mounts | grep smbfs | grep $MOUNTPOINT ) ; \
do umount $MOUNTPOINT ; done
Thanks Eli.
Rod
--
"Open Source Software - You usually get more than you pay for..."
"Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL"
More information about the PLUG
mailing list