[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: mounted multiple times
- From: "David J. Vernon" <redhat ladadee com>
- To: For users of Fedora Core releases <fedora-list redhat com>
- Subject: Re: mounted multiple times
- Date: Wed, 30 Nov 2005 13:11:10 -0500
Trevor TeC Christian wrote:
> On Wed, November 30, 2005 12:55 pm, Jack Tanner said:
>
>>On an FC4 client, I'm mounting an smbfs filesystem over the network. In
>>/etc/fstab, I have
>>
>>//server/share /mount/point smbfs
>>credentials=/home/user/.smbcreds,noauto,user 0 0
>>
>>The user's .bash_profile contains the actual mount command, which goes off
>>without a hitch. Consequently, the user can issue
>>
>>$ umount /mount/point
>>
>>when necessary.
>>
>>It's all well and good, until the user connects to the FC4 client twice,
>>and
>>runs two xterms which both source .bash_profile.
>>
>>Now the mount command has been issued twice, so here's what happens:
>>
>
>
> Should script such that the share isn't mounted unless it isn't already
> mounted.
>
something like -
#!/bin/bash
MOUNT='/bin/mount'
MOUNTPOINT='/mount/point'
if [ "`$MOUNT | grep "$MOUNTPOINT"`" = "" ]
then
mount /mount/point
fi
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]