beatfreak wrote:please post
+listing of filenames in (pendrive)/SamyGO/etc/init.d
+complete log
connect via ssh or telnet to tv and post output of
Hello, here I put the data, the log not to look one more full, nfs folders work perfectly with 03_03_nfsmount.init file, which does not get it to work is the recording by nfs, thank you very much, anything that you may need ask me, greetings
init.d
Code: Select all
01_05_framebuffer.init
01_05_framebuffer.init~
01_05_hiddev.init
02_04_replace_wifi_mod.init.dis
02_04_vusb.init
02_10_wakelan.init.dis
03_01_fuse.init
03_03_djmount.init
03_03_nfsmount.init
03_03_nfsmount.init~
03_03_sshd.init
04_04_bluetooth.init
04_04_fusesmb.init.dis
04_04_samba.init.dis
06_05_apache.init
06_05_vsftp.init.dis
06_06_obexpush.init.dis
80_80_record_to_nwshare.init
80_80_record_to_nwshare.init~
90_90_injectso.init.dis
90_90_loadGameMains.init.dis
99_99_start_exeDSP.init.disabled_by_default_to_protect_the_innocent
02_04_vusb.init
Code: Select all
. /dtv/SGO.env
case $1 in
start)
# on C series: can't open '/proc/scsi/scsi': No such file or directory?
# if [ `cat /proc/scsi/scsi | grep -c "Type:"` -lt "1" ] ; then
# create unsusable dummy device
# dd if=/dev/zero of=/dtv/vusb bs=512 count=4
# create usable vfat image
# we don't need to mess around with log and usblog
# also no limits to usb mounts
# we need to find mount point, on most devices it's sda
# but it will differ in some situations
mkfs.vfat -C /dtv/vusb 500
# mkfs.vfat -C /dtv/vusb $(($(df -k /dtv | grep dtv | sed -e 's,^\(.*\) \(.*\) \( .*% /dtv\),\2,') / 3 ))
# TODO: for recording on c series xfs stuff.
# /dev/stl0/21 392.3M 142.9M 249.4M 36% /mtd_rwcommon
# needs to be adapted:
# http://sourceforge.net/apps/phpbb/samygo/viewtopic.php?f=12&p=10567#p10567
#
# dd if=/dev/zero of=/mtd_rwcommon/vusb bs=1M count=16
# /sbin/mkfs.xfs -f -d name=/mtd_rwcommon/vusb
# ln -s /mtd_rwcommon/vusb /dtv/
# OBSOLETE: gone to 80_80_record_to_nwshare.init
# create usable virtual device (don't store data on it what you need tomorrow too!!)
# dd if=/dev/zero of=/dtv/vusb bs=1M count=2
# mkfs.ext3 -q -F -m 0 -b 1024 /dtv/vusb
# insmod $SYSROOT/lib/modules/treasure/dummy_hcd.ko
insmod $MOD_DIR/kernel/drivers/usb/gadget/dummy_hcd.ko
sleep 2
# insmod $SYSROOT/lib/modules/treasure/g_file_storage.ko
GFILESTORAGE='/dtv/vusb'
PVRIMAGE="$SYSROOT/pvrimage"
if [ -e $PVRIMAGE ]; then
GFILESIZE=`du $PVRIMAGE |cut -f1`
if [ $GFILESIZE -ge 1536000 ]; then
GFILESTORAGE="$GFILESTORAGE,$PVRIMAGE"
echo "Found pvrimage file $PVRIMAGE size=$GFILESIZE KByte, so enabling PVR Record over NFS"
else
echo "Found pvrimage file $PVRIMAGE size=$GFILESIZE KByte, but size is less than required (1536000 KBYTE), so PVR Record over NFS will not be enabled"
fi
else
echo "pvrimage $PVRIMAGE NOT found, so PVR Record over NFS will not be enabled"
fi
insmod $MOD_DIR/kernel/drivers/usb/gadget/g_file_storage.ko file="$GFILESTORAGE"
sleep 3
# find vusb in /sys
# and set a variable for mount point
FOUND=false
SAMYGODEVS=''
for i in /sys/block/sd?/device/model ; do
if [ `cat $i | grep -c "SamyGO Virt"` -gt "0" ]; then
CURDEV="`echo $i | sed 's/^\/.*\(sd.\)\/.*/\1/g'`"
SAMYGODEVS="$SAMYGODEVS /dev/$CURDEV"
if [ $FOUND = false ]; then
echo "found gadget at: $i"
dev=$CURDEV
echo "scsidev: $dev"
FOUND=true
fi
else
echo "real storage device at: $i"
fi
done
SAMYGODEVS=`echo $SAMYGODEVS|sed 's/^[[:space:]]//'`
# else
# echo "Storage Device is present"
# fi
sed -i -e "s,MountPlaceholder,/dtv/usb/$dev," /dtv/SGO.env
echo "SAMYGODEVS=\"$SAMYGODEVS\"" >> /dtv/SGO.env
;;
stop)
# what's about umount?
rmmod g_file_storage
rmmod dummy_hcd
;;
status)
cat /sys/block/sd?/device/model
;;
*)
echo "Usage: $0 {start|stop|status}" 1>&2
exit 0
;;
esac
03_03nfsmount.init
Code: Select all
. /dtv/SGO.env
#
# NFS share in the form of:
#
# SHARE_n='<SERVER NAME or IP>:<SHARE>'
#
# For multiple share on the same server use multiple entry with the same server name.
#
SHARE_1='192.168.1.10:/volume1/Anime'
SHARE_2='192.168.1.10:/volume1/Cine'
SHARE_3='192.168.1.10:/volume1/Deportes'
SHARE_4='192.168.1.10:/volume1/Descargas'
SHARE_5='192.168.1.10:/volume1/Grabaciones'
SHARE_6='192.168.1.10:/volume1/Series'
SHARE_7='192.168.1.10:/volume1/video'
FR_NAME="NFS Server"
# M_OPTS="rw,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"
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)
M_POINT="$DEST_DIR/$1/$(echo -n "$2" | 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" "$1:$2" "$M_POINT"
if [ $? = 0 ]; then
echo "Share $1:$2 successfully mounted on $M_POINT"
else
echo "Error during mount of $1:$2 on $M_POINT"
fi
else
echo "Share $1:$2 is already mounted!"
fi
}
get_shares()
{
ENDARRAY=false
N=1
while [ $ENDARRAY = false ]
do
eval SHARE=\${SHARE_${N}}
if [ -z "$SHARE" ]; then
ENDARRAY=true
else
SERVER=`echo "$SHARE"|cut -d ':' -f1`
SHPATH=`echo "$SHARE"|cut -d ':' -f2`
echo -n "Check if server $SERVER is reachable..."
showmount --no-header -e $SERVER 1>/dev/null 2>&1
if [ $? = 0 ]; then
echo 'ok'
do_mount "$SERVER" "$SHPATH"
else
echo 'NOT reachable skip!'
fi
let N=N+1
fi
done
}
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_shares
;;
stop)
# may can fail if device access the mount from content library
# for i in $(cat /proc/mounts | grep nfs | cut -d " " -f2) ; do
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
{
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)
# 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
;;
stop)
# may can fail if device access the mount from content library
# for i in $(cat /proc/mounts | grep nfs | cut -d " " -f2) ; do
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
80_80_record_to_nwshare.init
Code: Select all
. /dtv/SGO.env
# Remote NFS fileserver for recording
PVRSERVER='192.168.1.10'
# Remote NFS share for recording
PVRPATH='/volume1/Grabaciones'
# NFS mount options. If you experince problem like slow performance, try change this.
# 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"
# Number of second to wait for pvrimage mount point to be ready.
# If you experience problem like "No virtual device found ready for PVR or already mounted" message in samygo.log then try to increase this.
WAIT=25
WriteToLog ()
{
case $2 in
1)
NOW=`date +%Y%m%d-%H%M%S`
echo "$3" "$NOW $1" >>$LOGFILE
;;
2)
echo "$3" "$1" >>$LOGFILE
;;
esac
}
CheckNFSServer ()
{
WriteToLog "Check if server $1 is reachable and NFS service available..." 1 '-n'
showmount --no-header -e $1 1>/dev/null 2>&1
if [ $? = 0 ]; then
WriteToLog 'OK' 2
return 0
else
echo "NFS server $1 not reachable or NFS service not available"
WriteToLog 'not reachable or NFS service not available' 2
return 1
fi
}
SearchPVRImageMP ()
{
FOUND=false
WriteToLog 'Search for mount point of pvrimage...' 1
sleep $WAIT
for DEV in `echo $SAMYGODEVS`
do
MPOINT=`grep -e ^$DEV /proc/mounts | cut -d " " -f 2`
if [ -e "$MPOINT/.PlaceHolderDO-NOT-REMOVE" ] && [ $FOUND = false ]; then
PVRMPOINT=$MPOINT
FOUND=true
WriteToLog "pvrimage mount point is $PVRMPOINT" 1
fi
done
}
MountNFSShare ()
{
WriteToLog "Mount of $2:$3 on $4... " 1 '-n'
/bin/busybox mount -o "$1" "$2:$3" "$4" 2>>$LOGFILE
if [ $? = 0 ]; then
WriteToLog 'OK' 2
CONTENTSDIR="$4/CONTENTS"
if ! [ -d "$CONTENTSDIR" ]; then
echo -n "Creating directory $CONTENTSDIR for the first time..."
WriteToLog "Creating directory $CONTENTSDIR for the first time..." 1 '-n'
mkdir "$CONTENTSDIR"
echo "OK"
WriteToLog 'OK' 2
echo -n "Creating .PVRPfmChkLog file..."
WriteToLog 'Creating .PVRPfmChkLog file...' 1 '-n'
echo '1' > "$CONTENTSDIR/.PVRPfmChkLog"
echo "OK"
WriteToLog 'OK' 2
fi
echo "PVR on server $2 is now ready in localpath $4"
WriteToLog "PVR on server $2 is now ready in localpath $4" 1
else
echo "Error during mount of $2:$3 on $4 see $LOGFILE for details"
fi
}
case $1 in
start)
echo >$LOGFILE
WriteToLog 'Start Record to Network Share script (80_80_record_to_nwshare.init)' 1
CheckNFSServer "$PVRSERVER"
if [ $? = 0 ]; then
SearchPVRImageMP
if [ $FOUND = true ]; then
MountNFSShare "$M_OPTS" "$PVRSERVER" "$PVRPATH" "$PVRMPOINT"
else
echo 'No virtual device found ready for PVR or already mounted'
WriteToLog 'No virtual device found ready for PVR or already mounted' 1
fi
fi
WriteToLog 'End Record to Network Share script (80_80_record_to_nwshare.init)' 1
;;
stop)
;;
status)
;;
*)
echo "Usage: $0 {start|stop}" 1>&2
exit 0
;;
esac
Hello where I can find a more complete log, just know this
Code: Select all
19700101-000033 Start Record to Network Share script (80_80_record_to_nwshare.init)
19700101-000033 Check if server 192.168.1.10 is reachable and NFS service available... OK
19700101-000033 Search for mount point of pvrimage...
19700101-000059 No virtual device found ready for PVR or already mounted
19700101-000059 End Record to Network Share script (80_80_record_to_nwshare.init)
cat /proc/mounts
Code: Select all
# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / squashfs ro 0 0
none /proc proc rw 0 0
none /sys sysfs rw 0 0
none /dev/sam tmpfs rw 0 0
none /dtv tmpfs rw 0 0
none /dsm tmpfs rw 0 0
none /core tmpfs rw 0 0
none /tmp tmpfs rw 0 0
/dev/stl0/14 /mtd_rwarea rfs rw,codepage=utf8,vfat,fcache(blks)=128 0 0
/dev/stl0/19 /mtd_rocommon squashfs ro 0 0
/dev/stl0/17 /mtd_exe rfs ro,codepage=cp949,vfat,fcache(blks)=128 0 0
/dev/stl0/18 /mtd_appdata squashfs ro 0 0
/dev/stl0/13 /mtd_contents rfs rw,codepage=utf8,vfat,fcache(blks)=128 0 0
/dev/stl0/20 /mtd_swu rfs rw,codepage=cp949,vfat,fcache(blks)=128 0 0
/dev/stl0/21 /mtd_rwcommon rfs rw,codepage=utf8,vfat,fcache(blks)=128 0 0
none /proc/bus/usb usbfs rw 0 0
devpts /dev/pts devpts rw 0 0
/dev/sda1 /dtv/usb/sda1 vfat rw,sync,fmask=0022,dmask=0022,codepage=cp437,iocharset=utf8,shortname=mixed 0 0
/dev/stl0/14 /etc/passwd rfs rw,codepage=utf8,vfat,fcache(blks)=128 0 0
/dev/stl0/14 /etc/profile rfs rw,codepage=utf8,vfat,fcache(blks)=128 0 0
/dev/sdb /dtv/usb/sdb vfat rw,sync,fmask=0022,dmask=0022,codepage=cp437,iocharset=utf8,shortname=mixed 0 0
vfat /dtv/usb/sdb/upnp fuse ro,nosuid,nodev,user_id=0,group_id=0 0 0
192.168.1.10:/volume1/Anime /dtv/usb/sdb/nfs/192.168.1.10/_volume1_Anime nfs rw,vers=3,rsize=131072,wsize=131072,soft,nointr,nolock,proto=tcp,timeo=70,retrans=3,sec=sys,addr=192.168.1.10 0 0
192.168.1.10:/volume1/Cine /dtv/usb/sdb/nfs/192.168.1.10/_volume1_Cine nfs rw,vers=3,rsize=131072,wsize=131072,soft,nointr,nolock,proto=tcp,timeo=70,retrans=3,sec=sys,addr=192.168.1.10 0 0
192.168.1.10:/volume1/Deportes /dtv/usb/sdb/nfs/192.168.1.10/_volume1_Deportes nfs rw,vers=3,rsize=131072,wsize=131072,soft,nointr,nolock,proto=tcp,timeo=70,retrans=3,sec=sys,addr=192.168.1.10 0 0
/dev/sdc /dtv/usb/sdc xfs rw,nouuid,noquota 0 0
192.168.1.10:/volume1/Descargas /dtv/usb/sdb/nfs/192.168.1.10/_volume1_Descargas nfs rw,vers=3,rsize=131072,wsize=131072,soft,nointr,nolock,proto=tcp,timeo=70,retrans=3,sec=sys,addr=192.168.1.10 0 0
192.168.1.10:/volume1/Grabaciones /dtv/usb/sdb/nfs/192.168.1.10/_volume1_Grabaciones nfs rw,vers=3,rsize=131072,wsize=131072,soft,nointr,nolock,proto=tcp,timeo=70,retrans=3,sec=sys,addr=192.168.1.10 0 0
192.168.1.10:/volume1/Series /dtv/usb/sdb/nfs/192.168.1.10/_volume1_Series nfs rw,vers=3,rsize=131072,wsize=131072,soft,nointr,nolock,proto=tcp,timeo=70,retrans=3,sec=sys,addr=192.168.1.10 0 0
192.168.1.10:/volume1/video /dtv/usb/sdb/nfs/192.168.1.10/_volume1_video nfs rw,vers=3,rsize=131072,wsize=131072,soft,nointr,nolock,proto=tcp,timeo=70,retrans=3,sec=sys,addr=192.168.1.10 0 0
/ #