Attach USB to TV (not virtual)
Edit cifs_mount.sh script to mount to /dtv/usb/sda1
Is here an USB pluged in to tv? it is sda1, right?
Here is my mount.sh file, it mounts to sda1 if physical USB is plugged in at system start, or to sda1 virtual usb if it isn`t :
Code: Select all
#!/bin/sh
# Enable CIFS sharing
insmod /mtd_rwarea/modules/cifs.ko
sleep 10
#====================================================================
# Variables
#====================================================================
CIFS="/dtv/usb/sda1"
IP="//192.168.1.200"
USER="YOUR WINDOWS USERNAME"
PASSWORD="YOUR WINDOWS PASSOWRD"
SHARE1="Filmukai"
SHARE2="Downloads"
SHARE3="Muzika"
SHARE4="Foto"
#====================================================================
# append sda1 notification to log file:
#====================================================================
echo "[sda1]
Vendor : CIFSMount
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
exit
If you want, you can use my file, all what you need is to change your data in
Variables block. If you have less than 4 shares, edit script by deleting code in Variables, like:
SHARE4="Foto"
and code blocks like :
Code: Select all
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
To add new shares, just add the same blocks with $SHARESxx="mount name". To mount to virtual usb (to use mounts without USB plugged), you have to load virtual usb at system start.