Networking :: mounting windows shares



I figured myself. I tried to load the network mount automatically during each startup using daemon on top of /mnt/hda3/mnt. This means that I would have to mount /dev/hda3 before I could mount the network mounts. Since I was using daemon, and the daemon did not check the mount point, I ended up with mounting nothing.

So I mount the network shares with LinNeighborhood, and export the mountscript. Then I modified the mountscript so that the mountpoints will be restored before network mounting.

The mountscript looks like the following,

#! /bin/sh

# SMB mount script
# created by LinNeighborhood

mkdir /home/dsl/mnt
mkdir /home/dsl/mnt/MODELINGCENTER
mkdir /home/dsl/mnt/RELAXATION
mkdir /home/dsl/mnt/MODELINGCENTER/Data160G
mkdir /home/dsl/mnt/MODELINGCENTER/Data80G
mkdir /home/dsl/mnt/RELAXATION/F
mkdir /home/dsl/mnt/RELAXATION/Incoming

smbmount //MODELINGCENTER/Data160G /home/dsl/mnt/MODELINGCENTER/Data160G/ -o username=username%password,fmask=666,dmask=777,uid=1001,gid=50,ip=192.168.0.102,debug=0,workgroup=WORKGROUP
smbmount //MODELINGCENTER/Data80G /home/dsl/mnt/MODELINGCENTER/Data80G/ -o username=username%password,fmask=666,dmask=777,uid=1001,gid=50,ip=192.168.0.102,debug=0,workgroup=WORKGROUP
smbmount //RELAXATION/F /home/dsl/mnt/RELAXATION/F/ -o username=username%password,fmask=666,dmask=777,uid=1001,gid=50,ip=192.168.0.100,debug=0,workgroup=WORKGROUP
smbmount //RELAXATION/Incoming /home/dsl/mnt/RELAXATION/Incoming/ -o username=username%password,fmask=666,dmask=777,uid=1001,gid=50,ip=192.168.0.100,debug=0,workgroup=WORKGROUP

Then I add the mountscript in /opt/bootlocal.sh to mount the network share during boot.


original here.