Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
check mounted smb file systems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Ravicini
n00b
n00b


Joined: 03 Dec 2003
Posts: 4
Location: Switzerland

PostPosted: Mon May 10, 2004 4:21 pm    Post subject: check mounted smb file systems Reply with quote

I mounted an smb share with :arrow:

Code:
mount -t smbfs -o "rw,username=userS,password=pwdS,uid=userL,gid=groupL" //server/share /mnt/fha


How can i now check with a shell command if the mounted filesystem is present or not.
It is possible that the network connection breaks and if I copy something through a cron job or a script in the filesystem that it don't work.
Back to top
View user's profile Send private message
zsoltika
l33t
l33t


Joined: 13 Nov 2003
Posts: 634
Location: Budapest, Hungary

PostPosted: Mon May 10, 2004 4:58 pm    Post subject: Reply with quote

Just try this one:
Code:
ls /mnt/fha/directory/that/exists 1&>2 > /dev/null && myscript.sh


Of course, there are lot more ways to do this, but I prefer this one.
Sorry about my english, cheers:
Zsoltika

Edit: I swapped the 2&>1 thing. Now it's correct...
Back to top
View user's profile Send private message
Ravicini
n00b
n00b


Joined: 03 Dec 2003
Posts: 4
Location: Switzerland

PostPosted: Mon May 10, 2004 6:16 pm    Post subject: thank you Reply with quote

can you please tell me your other ones?

I haver ther problem, that i don't want to know any directory
that is in there (you wrote = directory/that/exists/)

thank you
_________________
Gentoo on PIV 2k Laptop
Kernel: 2.6.4
fluxbox

REBOOT life is a physical loopback anyway

How many people can read hex if only you
and dead people can read hex?
Back to top
View user's profile Send private message
zsoltika
l33t
l33t


Joined: 13 Nov 2003
Posts: 634
Location: Budapest, Hungary

PostPosted: Tue May 11, 2004 7:39 am    Post subject: Reply with quote

I would use this one in your case:
Code:
ls /mnt/fha/directory/* 1&>2 > /dev/null && myscript.sh


But I'm looking for other solutions, ASAP.
Cheers,
Zsoltik@
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum