View Single Post
Posts: 15 | Thanked: 1 time | Joined on Oct 2007
#1
Following the steps here: http://maemo.org/community/wiki/howtoaccesswindowscifs/ I have been able to get CIFS working. What I want to do next is use an init script to automatically mount and umount the share on boot/shutdown.

This is what I have made in /etc/init.d/

Code:
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

case "$1" in
  start)
	insmod /mnt/initfs/lib/modules/cifs.ko
	mount -t cifs //192.168.1.x/Hdd /home/user/MyDocs/.documents/nslu2 -o domain=Workgroup,user=user,password=password
	;;
  stop)
	umount /home/user/MyDocs/.documents/nslu2
	;;
  *)
	echo "error"
	;;
esac
I can type ./cifs start and ./cifs stop and everything works like a charm. But when I boot up, nothing has happened.

By the way, I am trying to connect to a file share on my linksys NSLU2 - another really nifty linux device.

What am I doing wrong? I know the path is often a thorn in the side of linux scripts, but I think I've declared just about everything!