View Single Post
Posts: 264 | Thanked: 28 times | Joined on May 2006
#10
OK, Here's what I'd do:
as root,
move the cifs.ko file to /lib/modules
add the following line to /etc/init.d/minircS near the top after the PATH= line:

insmod /lib/modules/cifs.ko

add the folowing line to the bottom of /etc/fstab

//192.168.001.112/Photos /home/user/MyDocs/.documents/foto cifs rw,domain=MSHOME,user=guest,password=guest
0 0

(all on one line)

Now your single script should be:

#!/bin/sh
# mount cifs shared folder
# use gainroot to become root and relaunch itself
if [ `id -u` != 0 ] ; then
#if not already root, call itself as root
sudo gainroot <<EOF
$0 $*
EOF
exit
fi
mount /home/user/MyDocs/.documents/foto

Put this script in /usr/bin, reboot and you're good to go.
Call it whatever you like, no need for ./ or a .sh extension. just make it executable.