UE40D6530 SAMBA problems

Here for general support for D series TVs, request and problem solve area.

pableiras
Posts: 1
Joined: Fri Apr 20, 2012 10:44 am

UE40D6530 SAMBA problems

Post by pableiras »

I've successfully installed SamyGO app in my TV, UE40D6530, but SAMBA is not working properly.

When I start SAMBA from the test.cgi (it's the same if I run it form shell with sh -x ...) I get the following error:

Code: Select all

+ 
/mtd_down/widgets/user/SamyGO/SamyGO/etc/init.d/04_04_samba.init: line 11: 
: Invalid argument
+ . /dtv/SGO.env
/mtd_down/widgets/user/SamyGO/SamyGO/etc/init.d/04_04_samba.init: .: line 12: can't open '/dtv/SGO.env
'
My 04_04_samba.init script is:

Code: Select all

#!/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="<my_user>"
PASSWD="<my pass>"
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.10"
# SERVER="10.0.0.1" # if you want a fixed server
SHARES=""
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
	;;
esac
Any clue?

Thanx!
nowo
Posts: 14
Joined: Sat Apr 21, 2012 10:01 am

Re: UE40D6530 SAMBA problems

Post by nowo »

Perhaps you must set user and pass..

Code: Select all

USER="<my_user>"
PASSWD="<my pass>"
hucky
SamyGO Project Donor
Posts: 39
Joined: Wed Mar 14, 2012 3:05 pm

Re: UE40D6530 SAMBA problems

Post by hucky »

I have exact same problem.

Like seen in the report samba.init script can't open /dtv/SGO.env

I dont know why. Knowing a bit of shell-scripting it seems to me
all this samba (client) stuff on series D 6xxx is heavily buggy.

For what is line 11 empty? --> error message
What means the space between . and /SGO.env ?

Would be nice if someone will explain complete mounting procedure
on this samsung items...
UE46F6750Firmware 1005
UE55H6470Firmware 2121.6
User avatar
juusso
SamyGO Moderator
Posts: 10128
Joined: Sun Mar 07, 2010 6:20 pm

Re: UE40D6530 SAMBA problems

Post by juusso »

hucky wrote: What means the space between . and /SGO.env ?
the dot isn`t just a dot per se here. This is the operator "source" which indicates to use arguments and commands from SGO.env...
So the space here is mandatory and needed :)
You can change the dot to source and you get same result:

Code: Select all

source /dtv/SGO.env
References:
http://ss64.com/bash/period.html
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE
hucky
SamyGO Project Donor
Posts: 39
Joined: Wed Mar 14, 2012 3:05 pm

Re: UE40D6530 SAMBA problems

Post by hucky »

Ok,

thanks. But why is "/dtv/SGO.env" not found?

The file exists.

Message:
  • + . /dtv/SGO.env
    /mtd_rwcommon/widgets/user/SamyGO/SamyGO/etc/init.d/04_04_samba.init: .: line 11: can't open '/dtv/SGO.env
    '
UE46F6750Firmware 1005
UE55H6470Firmware 2121.6
arris69
Official SamyGO Developer
Posts: 1700
Joined: Fri Oct 02, 2009 8:52 am
Location: Austria/Vienna (no Kangaroos here)
Contact:

Re: UE40D6530 SAMBA problems

Post by arris69 »

hucky wrote:I have exact same problem.

Like seen in the report samba.init script can't open /dtv/SGO.env

I dont know why. Knowing a bit of shell-scripting it seems to me
all this samba (client) stuff on series D 6xxx is heavily buggy.
no, it's bug free...
For what is line 11 empty? --> error message
...
you edited the samba-init script? if yes i'll bet you did it with windows notepad...
hucky
SamyGO Project Donor
Posts: 39
Joined: Wed Mar 14, 2012 3:05 pm

Re: UE40D6530 SAMBA problems

Post by hucky »

arris69 wrote:
hucky wrote:I have exact same problem.

Like seen in the report samba.init script can't open /dtv/SGO.env

I dont know why. Knowing a bit of shell-scripting it seems to me
all this samba (client) stuff on series D 6xxx is heavily buggy.
no, it's bug free...

OK, may be its bugfree but doesn't work ... no difference for normal user :lol:

For what is line 11 empty? --> error message
...
you edited the samba-init script? if yes i'll bet you did it with windows notepad...
No, I'm linuxer, no windows on me!

Is there anyone who can give some useful hints for the question which was and is:

Why the samba.init script can't open /dtv/SGO.env?

The file exists. Changing to mode 777 nothing changes.
UE46F6750Firmware 1005
UE55H6470Firmware 2121.6
arris69
Official SamyGO Developer
Posts: 1700
Joined: Fri Oct 02, 2009 8:52 am
Location: Austria/Vienna (no Kangaroos here)
Contact:

Re: UE40D6530 SAMBA problems

Post by arris69 »

hucky wrote:...

No, I'm linuxer, no windows on me!

Is there anyone who can give some useful hints for the question which was and is:

Why the samba.init script can't open /dtv/SGO.env?

The file exists. Changing to mode 777 nothing changes.
you can chmod it to 000 it will be loaded too, except you damaged the samba init file....

but the only thing is i don't see here any relevant information from you. it's same then i would ask: "my car is here but it won't start, why?"

how do you installed the widget/extensions how do you try to start it, did you start it??? etc...
DEUS
Official SamyGO Developer
Posts: 316
Joined: Mon Feb 06, 2012 12:05 pm
Location: Germany

Re: UE40D6530 SAMBA problems

Post by DEUS »

could you post the file from your TV here, no copy and paste of contents and maybe SGO.env ?
what happens when you issue ". /dtv/SGO.env" on shell directly?
hucky
SamyGO Project Donor
Posts: 39
Joined: Wed Mar 14, 2012 3:05 pm

Re: UE40D6530 SAMBA problems

Post by hucky »

:oops:SHAME AND BLAME ON ME!!! :oops:

I used "windows"-setting for line-end-code in my linux-editor.

Now the script is executed, still doesn't show me content but this
depends on wrong settings in my sambaserver (I hope so).

Thank you for your patience!

lg,
hucky
UE46F6750Firmware 1005
UE55H6470Firmware 2121.6

Post Reply

Return to “[D] Support”