Hi. Good day. What I did was change the file "03_03_nfsmount" and then turn off the tv and run the program SAMYGO. Now I can see in Vusb all the contents of my NAS. Below there are the two files that i have changed. Give a look!
#!/bin/sh
#
# ? Copyright 1996-2010, ZsoltTech.Com
# by Ser Lev Arris <
arris@ZsoltTech.Com>
#
# donated for the SamyGo Project
#
http://samygo.sourceforge.net/
#
# Version: SamyGO svn $Id: 03_03_nfsmount.init 1069 2011-01-03 16:47:24Z arris69 $
#############-Some Variables-####################
V_USB="sdc" # Aka name usb-device with 1 partition
USB_NAME="Server" # symbolyc name of usb-device
###############################################
sed -i -e "s,MountPlaceholder,/dtv/usb/${V_USB}1," /dtv/SGO.env
. /dtv/SGO.env
# sleep 9
##### YOU CAN CHANGE ME HERE ######
SERVER="192.168.1.251"
# SERVER="10.0.0.1" # if you want a fixed server
SHARES="Video Music Photo"
# SHARES="Video Music Photo" # if you won't all your shares, but then set SERVER too!!
##### CHANGE ME END ######
FR_NAME="NFS Server"
# M_OPTS="soft,udp,async,nolock,rsize=32768,wsize=8192"
# M_OPTS="rw,soft,udp,nolock,rsize=32768,wsize=32768"
# M_OPTS="soft,tcp,nolock,rsize=32768,wsize=32768"
# M_OPTS="soft,tcp,nolock,rsize=8192,wsize=8192"
M_OPTS="soft,tcp,nolock"
SERVERS="Don't set me!!"
DEST_DIR=$MOUNT_PATH/nfs
do_mount()
{
# $(echo -e "[sdg]\nVendor : NfsMount\nProduct : $FR_NAME\n\
#Serial : Q80VQLFG\nDevpath : 7\nLun : 0\nMountDir : $DEST_DIR\nFileSystem : vfat\n" >> /dtv/usb/log)
# cat usblog >> /dtv/usb/usblog
#echo -e "[sdc]\nVendor : Home\nProduct : Server\nSerial : 30122011\nDevpath : 7\n\
#Lun : 0\nScsiDevicePath : /dev/sdc1\nMountDir : $DEST_DIR\nFileSystem : vfat\n" >> /dtv/usb/usblog
for i in $S_MOUNTS ; do
#M_POINT="$DEST_DIR/$1/$(echo -n $i | sed -e "s/\//_/g")" #
SHARE_NAME=`expr match "$i" '.*\(/[a-z][a-z]*\)'` #Short shares name. added alex_kall delete if not needed
M_POINT=$DEST_DIR$SHARE_NAME #added
mkdir -p "$M_POINT"
if [ `cat /proc/mounts | grep -c "$M_POINT"` -lt "1" ] ; then
/bin/busybox mount -o "$M_OPTS" "$1:$i" "$M_POINT"
else
echo "$M_POINT is mounted!"
fi
done
}
get_shares()
{
if [ -z "$SHARES" ] ; then
echo -n "Search Shares on: "
for i in $SERVERS ; do
echo $i
# S_MOUNTS=$(showmount --no-headers -e $i | cut -d " " -f1)
S_MOUNTS=$(showmount --no-headers -e $i | sed 's/^\(.*\) .*/\1/')
[ -n "$S_MOUNTS" ] && do_mount $i
done
else
echo -n "Fixed Server: "
for i in $SERVERS ; do
echo $i
S_MOUNTS=$SHARES
[ -n "$S_MOUNTS" ] && do_mount $i
done
fi
}
get_servers()
{
if [ -z "$SERVER" ] ; then
# SERVERS=$(cat /proc/net/arp | grep -v "IP address" | cut -d " " -f1)
SERVERS=$(cat /proc/net/arp | grep -v "IP address" | sed 's/^\(\w*.\w*.\w*.\w*\) *.*/\1/')
else
SERVERS=$SERVER
fi
}
# Append to /dtv/usb/usblog records of new not-existing usb device //alex_kall
anounce_usb()
{
if [ -e /dtv/usb/usblog ] ; then
echo ""
else
touch /dtv/usb/usblog
fi
if [ `cat /dtv/usb/usblog | grep -c "$V_USB"` -lt "1" ] ; then
cp -f /dtv/usb/usblog /dtv/usb/usblog.bak
if [ `cat /proc/mounts | grep -c "$M_POINT"` > "0" ] ; then
echo -e "[$V_USB]\nVendor : Home\nProduct : $USB_NAME\nSerial : 30122011\nDevpath : 7\n\
Lun : 0\nScsiDevicePath : /dev/${V_USB}1\nMountDir : $DEST_DIR\nFileSystem : vfat\n" >> /dtv/usb/usblog
else
echo "Nothing is mounted!"
fi
else echo "$V_USB is already in use. Pleas choos another value of V_USB"
fi
}
case $1 in
start)
# for systems with modular nfs kernel support
insmod $MOD_DIR/kernel/net/sunrpc/sunrpc.ko
insmod $MOD_DIR/kernel/fs/lockd/lockd.ko
insmod $MOD_DIR/kernel/fs/nfs_common/nfs_acl.ko
insmod $MOD_DIR/kernel/fs/nfs/nfs.ko
get_servers
get_shares
anounce_usb
;;
stop)
# may can fail if device access the mount from content library
# for i in $(cat /proc/mounts | grep nfs | cut -d " " -f2) ; do
cp -f /dtv/usb/usblog.bak /dtv/usb/usblog
for i in $(cat /proc/mounts | grep "$DEST_DIR" | sed 's/^\(.*\) \(.*\) nfs .*/\2/') ; do
/bin/busybox umount $i
done
;;
status)
/bin/mount | grep "$DEST_DIR"
;;
*)
echo "Usage: $0 {start|stop|status}" 1>&2
exit 0
;;
esac
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------!/bin/sh
#
# ? Copyright 1996-2010, ZsoltTech.Com
# by Ser Lev Arris <
arris@ZsoltTech.Com>
#
# donated for the SamyGo Project
#
http://samygo.sourceforge.net/
#
# Version: SamyGO svn $Id: 04_04_samba.init 1069 2011-01-03 16:47:24Z arris69 $
#
. /dtv/SGO.env
# sleep 9
##### CHANGE MEEEEE !!!!! ######
USER="sysadmin"
PASSWD="carteiro"
PERM="rw" # can be ro or rw
##### CHANGE MEEEEE END ######
[ -e /mtd_rwarea/smb_userdata ] && source /mtd_rwarea/smb_userdata
[ -z $USER ] && exit 1
[ -z $PASSWD ] && exit 1
DEST_DIR=$MOUNT_PATH/smb
SERVER="192.168.1.251"
# SERVER="10.0.0.1" # if you want a fixed server
SHARES="Video Music Photo"
FR_NAME="Samba Server"
# M_OPTS="rw,user=${USER},password=${PASSWD}"
M_OPTS="$PERM,user=${USER},password=${PASSWD},codepage=cp1250,iocharset=utf8"
SERVERS="Don't set me!!"
do_mount()
{
# $(echo -e "[sdh]\nVendor : CifsMount\nProduct : $FR_NAME\n\
#Serial : Q80VQLFH\nDevpath : 8\nLun : 0\nMountDir : $DEST_DIR\nFileSystem : vfat\n" >> /dtv/usb/log)
for i in $S_MOUNTS ; do
i="$(echo -n $i | sed -e 's/SGOspace/ /g')"
M_POINT="$DEST_DIR/$1/$(echo -n $i | sed -e "s/\\\$/_/g")"
mkdir -p "$M_POINT"
if [ `cat /proc/mounts | grep -c "$M_POINT"` -lt "1" ] ; then
/bin/busybox mount -o "${M_OPTS}" -t cifs "//$1/$i" "$M_POINT"
else
echo "$M_POINT is mounted!"
fi
done
}
get_shares()
{
echo "Search Shares"
for i in $SERVERS ; do
echo "on: $i"
S_MOUNTS=$(smbclient -s "$SYSROOT/etc/samba/smb.conf" -U ${USER}%${PASSWD} \
-g -L $i | grep "Disk|" | grep -v "\\$" | grep -v " Service" | sed -r 's/.*\|(.*)\|.*/\1/' | sed -r 's/ /SGOspace/g')
# -g -L $i | grep "Disk|" | grep -v "\\$" | grep -v " Service" | cut -d "|" -f2)
[ -n "$S_MOUNTS" ] && do_mount $i
done
}
get_servers()
{
if [ -z "$SERVER" ] ; then
# SERVERS=$(cat /proc/net/arp | grep -v "IP address" | cut -d " " -f1)
SERVERS=$(cat /proc/net/arp | grep -v "IP address" | sed 's/^\(\w*.\w*.\w*.\w*\) *.*/\1/')
else
SERVERS=$SERVER
fi
}
case $1 in
start)
insmod $MOD_DIR/kernel/fs/cifs/cifs.ko
mkdir -p "$DEST_DIR"
get_servers
get_shares
;;
stop)
# may can fail if device access the mount from content library
# for i in $(cat /proc/mounts | grep cifs | cut -d " " -f2) ; do
for i in $(cat /proc/mounts | grep cifs | grep "$DEST_DIR" | sed 's/^\(.*\) \(.*\) cifs .*/\2/') ; do
i="$(echo -n $i | sed -r 's/\\040/ /g')"
/bin/busybox umount "$i"
done
;;
status)
/bin/mount | grep "$DEST_DIR"
;;
*)
echo "Usage: $0 {start|stop}" 1>&2
exit 0
;;
esacbrunogts77
Posts: 16
Joined: Sat Feb 18, 2012 7:34 pm
Private message