You have to create mount.sh:unclebob wrote: The wiki asks me to create the SamyGO.sh file, which have done, but im thinking i need to put something where it says:
#Your lines here!
So the question is, what do i put in to get my NFS share visible or what else do i put in here???
Code: Select all
vi /mtd_rwarea/mount.sh
Code: Select all
#!/bin/sh
#====================================================================
# connection data
#====================================================================
NFS="/dtv/usb/sda1"
IP="192.168.1.200:/mnt/disk1"
SHARE1="Cinema"
SHARE2="Downloads"
SHARE3="Music"
SHARE4="Photo"
#====================================================================
# append sda1 notification to log file:
#====================================================================
echo "[sda1]
Vendor : NfsMount
Product : File-Stor Gadget
Serial : Q80VQLFH
Devpath : 8
Lun : 0
MountDir : /dtv/usb/sda1
FileSystem : vfat
" >> /dtv/usb/log
#====================================================================
#Create Folder for VUSB-Mountpoints
#====================================================================
if [ `mount | grep -c $NFS` == 0 ]; then
mkdir -p $NFS
fi
#====================================================================
# Mounting the shares
#====================================================================
if [ `mount | grep -c $NFS/$SHARE1` == 0 ]; then
echo "Mounting NFS Shares"
mkdir -p $NFS/$SHARE1
mount -o nolock $IP/$SHARE1 $NFS/$SHARE1 -t nfs
else
echo "NFS Shares already Mounted"
fi
if [ `mount | grep -c $NFS/$SHARE2` == 0 ]; then
echo "Mounting NFS Shares"
mkdir -p $NFS/$SHARE2
mount -o nolock $IP/$SHARE2 $NFS/$SHARE2 -t nfs
else
echo "NFS Shares already Mounted"
fi
if [ `mount | grep -c $NFS/$SHARE3` == 0 ]; then
echo "Mounting NFS Shares"
mkdir -p $NFS/$SHARE3
mount -o nolock $IP/$SHARE3 $NFS/$SHARE3 -t nfs
else
echo "NFS Shares already Mounted"
fi
if [ `mount | grep -c $NFS/$SHARE4` == 0 ]; then
echo "Mounting NFS Shares"
mkdir -p $NFS/$SHARE4
mount -o nolock $IP/$SHARE4 $NFS/$SHARE4 -t nfs
else
echo "NFS Shares already Mounted"
fi
exit
Code: Select all
chmod 755 /mtd_rwarea/mount.sh
E.g
Code: Select all
#Your lines here!
/mtd_rwarea/mount.sh&
Code: Select all
#!/bin/sh
# Enable CIFS sharing
insmod /mtd_rwarea/modules/cifs.ko
sleep 10
#====================================================================
# connection data
#====================================================================
CIFS="/dtv/usb/sda1"
IP="//192.168.1.200"
USER="YOUR WINDOWS USERNAME"
PASSWORD="YOUR WINDOWS PASSOWRD"
SHARE1="Cinema"
SHARE2="Downloads"
SHARE3="Music"
SHARE4="Photo"
#====================================================================
# append sda1 notification to log file:
#====================================================================
echo "[sda1]
Vendor : NfsMount
Product : File-Stor Gadget
Serial : Q80VQLFH
Devpath : 8
Lun : 0
MountDir : /dtv/usb/sda1
FileSystem : vfat
" >> /dtv/usb/log
#====================================================================
#Create Folder for VUSB-Mountpoints
#====================================================================
if [ `mount | grep -c $CIFS` == 0 ]; then
mkdir -p $CIFS
fi
#====================================================================
# Mounting the shares
#====================================================================
if [ `mount | grep -c $CIFS/$SHARE1` == 0 ]; then
echo "Mounting Windows Shares"
mkdir -p $CIFS/$SHARE1
mount -o user=$USER,password=$PASSWORD -t cifs $IP/$SHARE1 $CIFS/$SHARE1
else
echo "Windows Shares already Mounted"
fi
if [ `mount | grep -c $CIFS/$SHARE2` == 0 ]; then
echo "Mounting Windows Shares"
mkdir -p $CIFS/$SHARE2
mount -o user=$USER,password=$PASSWORD -t cifs $IP/$SHARE2 $CIFS/$SHARE2
else
echo "Windows Shares already Mounted"
fi
if [ `mount | grep -c $CIFS/$SHARE3` == 0 ]; then
echo "Mounting Windows Shares"
mkdir -p $CIFS/$SHARE3
mount -o user=$USER,password=$PASSWORD -t cifs $IP/$SHARE3 $CIFS/$SHARE3
else
echo "Windows Shares already Mounted"
fi
if [ `mount | grep -c $CIFS/$SHARE4` == 0 ]; then
echo "Mounting Windows Shares"
mkdir -p $CIFS/$SHARE4
mount -o user=$USER,password=$PASSWORD -t cifs $IP/$SHARE4 $CIFS/$SHARE4
else
echo "Windows Shares already Mounted"
fi