TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

/etc/fstab for smbmount



Is there an equivalent file to /etc/fstab for smbmount. I'd like to be
about to type 

smbmount /mnt/dir
and 
smbumount /mnt/dir

witohut typing all the //server/directory stuff ( maybe store passwords
also?)

If this doesn't exist, what's the best way to write a script to do this? 
I was thinking of having

/etc/smbstab have

helen //server/helen
john //smith/asdf


mysmbmount:
#!/bin/sh
options=`grep $1 /etc/smbstab`
shift $options
#note, I know the shift $options isn't the right syntax, but I don't know
#the command to shift the elements of a variable over one
smbmount $options /mnt/$1


I might do some tail stuff to make sure I only get one line form grep $1 



Thanks,

Ben




Ben Luey
lueyb@carleton.edu
ICQ: 19144397

I have a spelling checker,
Eye got it four my P.C.
It plainly marks four my revue
Miss Steaks I cannot sea
I've rune this poem threw it
I'm sure your pleased too no
Its letter perfect in it's weigh
My checker tolled me sew.        --  Unknown