Help translate code

Hi, all of you!!!

I have this code and I won to build-in some more code.

I know this is a lot of code.

if [ ! -z $1 ] ; then
                if [ -x "$1"/etc/rc.sysinit ] ; then
                        SYSROOT="$1"
                        S_SCRIPT="cd $1 ; ./etc/rc.sysinit 2>&1 &"
                fi
        else
                for SYSROOT in ${1:- \
                        /dtv/usb/sd*/SamyGO \
                        /dtv/usb/sd*/*/SamyGO \
                        /dtv/usb/sd*/*/*/SamyGO \
                        /mtd_tlib/SamyGO \
                        /mtd_tlib/*/SamyGO \
                        /mtd_tlib/*/*/SamyGO \
                        /mtd_down/SamyGO \
                        /mtd_contents/SamyGO \
                        /mtd_rwcommon/SamyGO \
                        /mtd_wiselink/SamyGO} ; do
                        if [ -x $SYSROOT/etc/rc.sysinit ] ; then
                                S_SCRIPT="cd $SYSROOT ; ./etc/rc.sysinit 2>&1 &"
                                break
                                # if no extension installed try telnet
                        elif [ -x /etc/telnetd_start.sh ] ; then
                                S_SCRIPT="/etc/telnetd_start.sh &"
                        else
                                echo "rc script not found in $SYSROOT"
                                # this should work on A and C series if we shipp busybox
                                # /etc/telnetd_start.sh isn't existent?
                                if [ `cat /proc/mounts | grep -c "devpts"` -gt "0" ] ; then
                                        echo "devpts is mounted, nothing to do"
                                else
                                        # hope this won't break boot process
                                        mount -n -t devpts devpts /dev/pts
                                fi
                                # this isn't realy supported for now
                                # busybox telnetd forks perse, but who knows...
                                S_SCRIPT="$SYSROOT/bin/busybox telnetd 2>&1 &"
                                # TV has no nic -> first get usb wifi working
                                #       # T-RBYDEU -> no telnet start script, has inetd
                                #       ifconfig lo 127.0.0.1
                                #       # hmm
                                #       mount -t devpts devpts /dev/pts
                                #       S_SCRIPT="/usr/sbin/inetd >/dev/null 2>&1 &"
                        fi
                done

I won to build this code into the SYSROOT:

if [ -d /dtv/usb/sda/smb/192.168.0.100/Qbackup/mtd_tlib/GGame ] ; then
SYSROOT="/dtv/usb/sda/smb/192.168.0.100/Qbackup/mtd_tlib/GGame/SamyGO"
else

so it works with this:

echo "SYSROOT=\"$SYSROOT\"" > /dtv/SGO.env

I hope you understand my question!

I don't, sorry. How about instead of saying "build in" tell us what you want to happen?

Yes you're right, but I am a very newbee on this.

I have a NAS and my TV.

I have mounted my NAS to my TV.
as you proberly can read out of this line.
mount --bind /dtv/usb/sda/smb/192.168.0.100/Qbackup/mtd_tlib/GGame /mtd_tlib/GGame

mount --bind /dtv/usb/sda/smb/192.168.0.100/Qbackup/mtd_tlib/swf /mtd_tlib/swf
After I mounted the NAS and I ssh into my TV I don't have rights anymore : keep saying permission denied.

So I think I need to do a check and point to the SYSROOT to the new place.

what keeps saying permission denied, in response to what, logged in as who?

Just binding a directory somewhere else doesn't give you permissions to use it.Try ls -ld on the directories you don't have permissions on, see who it thinks it belongs to.

login as: root
root@192.168.0.150's password:
-sh: id: not found
# busybox whoami
root
#

I worked on it!! give mye five minutes.

---------- Post updated at 10:44 PM ---------- Previous update was at 10:34 PM ----------

# /mtd_rwarea/SamyGO.sh: /mtd_rwarea/SamyGO.sh: 51: /dtv/usb/sda/smb/192.168.0.100/Qbackup/mtd_tlib/GGame/SamyGO/rcSGO: Permission denied

Alright... so ls -ld /dtv/usb/sda/smb/192.168.0.100/Qbackup/mtd_tlib/GGame/SamyGO/rcSGO and also df -h while you're at it

/dtv/usb/sda/smb/192.168.0.100/Qbackup cifs //192.168.0.100/Qbackup

        Mounted on                                              Type                    Partition

ls -ld /dtv/usb/sda/smb/192.168.0.100/Qbackup/mtd_tlib/GGame/SamyGO/rcSGO

When I run this file - it all happen - It mount and set the denied permission

#!/bin/sh
###############################

#  Filename: mtd_rwarea/SamyGO.sh      Modified af Per      #

################################

# Enable Telnetd
if [ `cat /proc/mounts | grep -c "/dev/pts"` -lt "1" ] ; then
i        echo "telnetd Enabled"
           mount -t devpts devpts /dev/pts
           telnetd
     else
        echo "/dev/pts is mounted"
 fi

 # Open back-door for fixing boot-loop situations
  sleep 20            # Allow USB-stick to settle
 USB="/dtv/usb/sda1" # USB mount-point

  if [ -f $USB/usb.sh ];then
             echo "USB-File detected"
          $USB/usb.sh

  exit
 else

 echo " "
  echo "Starter SamyGO normalt"
fi

echo " "
#if `GGame -d /dtv/usb/sda/smb/192.168.0.100/Qbackup/mtd_tlib`;then
echo " "
                echo "Monterer NAS p� TV"

mount --bind /dtv/usb/sda/smb/192.168.0.100/Qbackup/mtd_tlib/GGame /mtd_tlib/GGame
mount --bind /dtv/usb/sda/smb/192.168.0.100/Qbackup/mtd_tlib/swf /mtd_tlib/swf

#else
echo " "
echo "Kunne ikke montere NAS p� TV"
#fi
/mtd_tlib/GGame/SamyGO/rcSGO&
echo " "
echo "F�rdig"

---------- Post updated at 11:11 PM ---------- Previous update was at 11:10 PM ----------

# ls -ld /dtv/usb/sda/smb/192.168.0.100/Qbackup/mtd_tlib/GGame/SamyGO/rcSGO
-rw-rw-rw-    1 root     0            3512 Jan 23  2011 /dtv/usb/sda/smb/192.168.0.100/Qbackup/mtd_tlib/GGame/SamyGO/rcSGO
#

---------- Post updated at 11:15 PM ---------- Previous update was at 11:11 PM ----------

Maybe you should know that I have moved the files from my TV to NAS storage. So I have the files at 2 places.
The Game folder keeps the program SamyGO and some games. In the SamyGO are there some files - the same files are on my TV.

---------- Post updated at 11:24 PM ---------- Previous update was at 11:15 PM ----------

On my TV the same file - rcSGO
# ls -ld rcSGO
-rw-rw-rw- 1 root 0 3512 Jan 23 2011 rcSGO
# pwd
/mtd_tlib/GGame/SamyGO

---------- Post updated at 11:33 PM ---------- Previous update was at 11:24 PM ----------

Here is how it looks like "before" and "when" I have run the SamyGO.sh

# mc
Start SamyGO Midnight Commander

Startet Midnight Commander - file editor
# sh /mtd_rwarea/SamyGO.sh
/dev/pts is mounted

Starter SamyGO normalt
telnetd: bind: Address already in use
# mc
-sh: mc.sh: Permission denied
# mc.sh
-sh: mc.sh: Permission denied
#

---------- Post updated at 11:39 PM ---------- Previous update was at 11:33 PM ----------

login as: root
root@192.168.0.150's password:
-sh: id: not found
# cat /mtd_tlib/GGame/SamyGO/rcSGO
#!/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-CoreScript svn $Id: rcSGO 345 2010-01-25 11:44:05Z arris $

# do some background checks (not implemented/need)

if [ ! -e /dtv/SGO.env ] ; then
        # some helper stuff
        alias .='source'

        # if running as real linuxrc
        if [ ! -e /proc/mounts ]; then
                mount -n -t proc /proc /proc
                mount -n -t sysfs /sys /sys >/dev/null 2>&1
        fi

        KERN_VER=$(cat /proc/version  | sed -e 's/\(.*inux version \)\(.*\) \(.*@.*\)$/\2/')

        # for lsusb
        # mount -n -t usbfs usbfs /proc/bus/usb

        if [ -x /etc/rc.early.local ]; then
                echo ". /etc/rc.early.local" 1>&2
        fi

        if [ -d /mtd_wiselink ] ; then
                NEW_HOME="/mtd_wiselink"
        else
                NEW_HOME="/mtd_contents"
        fi

        # harden
        if [ ! -e /mtd_rwarea/passwd ]; then
                echo "root:"ENCRYPTED":0:0:SamyGO secured Root:$NEW_HOME:/bin/sh" > /mtd_rwarea/passwd
        fi
        mount -o bind /mtd_rwarea/passwd /etc/passwd

        # do the work (try to find SamyGO or start telnetd)
        # other user scripts are not supported SamyGO has
        # extensions for automount etc...
        # feature requests at: http://samygo.sourceforge.net/

        # just here for testing
        S_SCRIPT="echo Bummer >> /dev/kmsg"

        # http://sourceforge.net/apps/phpbb/samygo/viewtopic.php?f=4&t=207&start=0&hilit=libSamyGO
        # samyGo use on LN52A850 (T-SPHAUSC v.1004)
        # Postby tskitishvili » Wed Dec 16, 2009 2:56 am
        # ... no cut in busybox

        if [ ! -z $1 ] ; then
                if [ -x "$1"/etc/rc.sysinit ] ; then
                        SYSROOT="$1"
                        S_SCRIPT="cd $1 ; ./etc/rc.sysinit 2>&1 &"
                fi
        else
                for SYSROOT in ${1:- \
                        /dtv/usb/sd*/SamyGO \
                        /dtv/usb/sd*/*/SamyGO \
                        /dtv/usb/sd*/*/*/SamyGO \
                        /mtd_tlib/SamyGO \
                        /mtd_tlib/*/SamyGO \
                        /mtd_tlib/*/*/SamyGO \
                        /mtd_down/SamyGO \
                        /mtd_contents/SamyGO \
                        /mtd_rwcommon/SamyGO \
                        /mtd_wiselink/SamyGO} ; do
                        if [ -x $SYSROOT/etc/rc.sysinit ] ; then
                                S_SCRIPT="cd $SYSROOT ; ./etc/rc.sysinit 2>&1 &"
                                break
                                # if no extension installed try telnet
                        elif [ -x /etc/telnetd_start.sh ] ; then
                                S_SCRIPT="/etc/telnetd_start.sh &"
                        else
                                echo "rc script not found in $SYSROOT"
                                # this should work on A and C series if we shipp busybox
                                # /etc/telnetd_start.sh isn't existent?
                                if [ `cat /proc/mounts | grep -c "devpts"` -gt "0" ] ; then
                                        echo "devpts is mounted, nothing to do"
                                else
                                        # hope this won't break boot process
                                        mount -n -t devpts devpts /dev/pts
                                fi
                                # this isn't realy supported for now
                                # busybox telnetd forks perse, but who knows...
                                S_SCRIPT="$SYSROOT/bin/busybox telnetd 2>&1 &"
                                # TV has no nic -> first get usb wifi working
                                #       # T-RBYDEU -> no telnet start script, has inetd
                                #       ifconfig lo 127.0.0.1
                                #       # hmm
                                #       mount -t devpts devpts /dev/pts
                                #       S_SCRIPT="/usr/sbin/inetd >/dev/null 2>&1 &"
                        fi
                done
        fi

        echo "SYSROOT=\"$SYSROOT\"" > /dtv/SGO.env
        echo "MOUNT_PATH=\"MountPlaceholder\"" >> /dtv/SGO.env
        echo "export MOD_DIR=$SYSROOT/lib/modules/$KERN_VER" >> /dtv/SGO.env
        echo "export TMPDIR=/dtv" >> /dtv/SGO.env
        echo "export HOME=$NEW_HOME" >> /dtv/SGO.env
        echo "export SMB_CONF_PATH=\"$SYSROOT/etc/samba/smb.conf\"" >> /dtv/SGO.env

else
        S_SCRIPT="echo Skip >> /dev/kmsg"
fi

# go to sed due busybox on T-SPHAUSC
# echo "SYSROOT=\"$(echo "$S_SCRIPT" | cut -d " " -f2)\"" > /dtv/SGO.env
# is already set
# echo "SYSROOT=\"$(echo "$S_SCRIPT" | sed 's/cd \(.*\) ;.*/\1/')\"" > /dtv/SGO.env
eval $S_SCRIPT

#

I think it is the red marked code - there is failed.

ls -l /dtv/SGO.env

And I'm still waiting for df -h

# ls -l /dtv/SGO.env
-rw-r--r--    1 root     0             929 Jan  1 00:00 /dtv/SGO.env
# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/tbml6                3.1M      3.1M         0 100% /
none                     10.0M      1.7M      8.3M  17% /dtv
/dev/tbml7              896.0k    896.0k         0 100% /mtd_boot
none                     10.0M      4.0k     10.0M   0% /mtd_ram
/dev/stl0/14             11.0M      8.1M      2.9M  74% /mtd_rwarea
/dev/tbml8               60.0M     51.2M      8.8M  85% /mtd_exe
/dev/tbml9               28.6M     28.6M         0 100% /mtd_appdata
/dev/stl0/13            189.0M    165.3M     23.7M  87% /mtd_tlib
/dev/stl0/15             50.0M      2.4M     47.5M   5% /mtd_contents
/dev/stl0/16             87.9M     16.3M     71.6M  19% /mtd_down
/dev/stl0/12            149.0M    384.0k    148.6M   0% /mtd_wiselink
/dev/stl0/17             87.0M    176.0k     86.8M   0% /mtd_swu
/dev/stl0/14             11.0M      8.1M      2.9M  74% /etc/passwd
/dev/stl0/14             11.0M      8.1M      2.9M  74% /etc/profile
/dev/sda                482.0k     36.0k    446.0k   7% /dtv/usb/sda
fuse                      3.1M      3.1M         0 100% /dtv/usb/sda/fusesmb
//192.168.0.100/Qweb    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/Qweb
//192.168.0.100/Qdownload    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/Qdownload
//192.168.0.100/Public    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/Public
//192.168.0.100/Qmultimedia    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/Qmultimedia
//192.168.0.100/Qusb    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/Qusb
//192.168.0.100/KBPack    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/KBPack
//192.168.0.100/MySQL    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/MySQL
//192.168.0.100/QGet    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/QGet
//192.168.0.100/Qbackup    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/Qbackup
//192.168.0.100/Qbig-disk    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/Qbig-disk
//192.168.0.100/Charlotte    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/Charlotte
//192.168.0.100/everyone    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/everyone
//192.168.0.197/Hentede filer    111.8G     98.1G     13.7G  88% /dtv/usb/sda/smb/192.168.0.197/Hentede filer
//192.168.0.197/SharedDocs    111.8G     98.1G     13.7G  88% /dtv/usb/sda/smb/192.168.0.197/SharedDocs
#

---------- Post updated at 11:56 PM ---------- Previous update was at 11:54 PM ----------

And after I run the SamyGO.sh

# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/tbml6                3.1M      3.1M         0 100% /
none                     10.0M      1.7M      8.3M  17% /dtv
/dev/tbml7              896.0k    896.0k         0 100% /mtd_boot
none                     10.0M      4.0k     10.0M   0% /mtd_ram
/dev/stl0/14             11.0M      8.1M      2.9M  74% /mtd_rwarea
/dev/tbml8               60.0M     51.2M      8.8M  85% /mtd_exe
/dev/tbml9               28.6M     28.6M         0 100% /mtd_appdata
/dev/stl0/13            189.0M    165.3M     23.7M  87% /mtd_tlib
/dev/stl0/15             50.0M      2.4M     47.5M   5% /mtd_contents
/dev/stl0/16             87.9M     16.3M     71.6M  19% /mtd_down
/dev/stl0/12            149.0M    384.0k    148.6M   0% /mtd_wiselink
/dev/stl0/17             87.0M    176.0k     86.8M   0% /mtd_swu
/dev/stl0/14             11.0M      8.1M      2.9M  74% /etc/passwd
/dev/stl0/14             11.0M      8.1M      2.9M  74% /etc/profile
/dev/sda                482.0k     36.0k    446.0k   7% /dtv/usb/sda
fuse                      3.1M      3.1M         0 100% /dtv/usb/sda/fusesmb
//192.168.0.100/Qweb    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/Qweb
//192.168.0.100/Qdownload    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/Qdownload
//192.168.0.100/Public    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/Public
//192.168.0.100/Qmultimedia    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/Qmultimedia
//192.168.0.100/Qusb    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/Qusb
//192.168.0.100/KBPack    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/KBPack
//192.168.0.100/MySQL    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/MySQL
//192.168.0.100/QGet    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/QGet
//192.168.0.100/Qbackup    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/Qbackup
//192.168.0.100/Qbig-disk    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/Qbig-disk
//192.168.0.100/Charlotte    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/Charlotte
//192.168.0.100/everyone    365.7G    214.0G    151.7G  59% /dtv/usb/sda/smb/192.168.0.100/everyone
//192.168.0.197/Hentede filer    111.8G     98.1G     13.7G  88% /dtv/usb/sda/smb/192.168.0.197/Hentede filer
//192.168.0.197/SharedDocs    111.8G     98.1G     13.7G  88% /dtv/usb/sda/smb/192.168.0.197/SharedDocs
//192.168.0.100/Qbackup    365.7G    214.0G    151.7G  59% /mtd_tlib/GGame
//192.168.0.100/Qbackup    365.7G    214.0G    151.7G  59% /mtd_tlib/swf
#

---------- Post updated 27-01-11 at 12:05 AM ---------- Previous update was 26-01-11 at 11:56 PM ----------

The file called SGO.env

# cat SGO.env
SYSROOT="/mtd_tlib/GGame/SamyGO"
MOUNT_PATH="/dtv/usb/sda"
export MOD_DIR=/mtd_tlib/GGame/SamyGO/lib/modules/2.6.18_SELP-ARM
export TMPDIR=/dtv
export HOME=/mtd_wiselink
export SMB_CONF_PATH="/mtd_tlib/GGame/SamyGO/etc/samba/smb.conf"
LD_LIBRARY_PATH="/mtd_tlib/GGame/SamyGO/opt/privateer/lib:/mtd_tlib/GGame/SamyGO/opt/privateer/usr/lib:/mtd_tlib/GGame/SamyGO/lib:/mtd_tlib/GGame/SamyGO/usr/lib:/lib:/lib/tls:/usr/lib:/Java/lib:/mtd_cmmlib/Comp_LIB:/mtd_cmmlib/InfoLink/lib:/mtd_cmmlib/GAME_LIB:/mtd_cmmlib/DRM_LIB:/mtd_cmmlib/YWidget_LIB"
PATH="/mtd_tlib/GGame/SamyGO/opt/privateer/sbin:/mtd_tlib/GGame/SamyGO/opt/privateer/bin:/mtd_tlib/GGame/SamyGO/opt/privateer/usr/bin:/mtd_tlib/GGame/SamyGO/opt/privateer/usr/sbin:/mtd_tlib/GGame/SamyGO/sbin:/mtd_tlib/GGame/SamyGO/bin:/mtd_tlib/GGame/SamyGO/usr/bin:/mtd_tlib/GGame/SamyGO/usr/sbin:/usr/bin:/bin:/usr/sbin:/sbin"
export ENV="/dtv/.ashrc"
export FRAMEBUFFER="/dev/sam/fb0"
#

---------- Post updated at 12:35 AM ---------- Previous update was at 12:05 AM ----------

What to do next???

Bumping's against the rules, please. I'm not on call and I have to eat sometime. :stuck_out_tongue:

You've got a bit of a crazy system there. Embedded systems are always a challenge to deal with, their layout's so nontraditional it can barely be called Gnu/Linux at all. Look at that crazy layout -- what is /etc/passwd doing in the mount table? :eek:

So, /dtv/ looks to be a RAMdisk... maybe...

ls -l /dtv

I am very sorry, bumping.

# ls -l /dtv
-rw-r--r-- 1 root 0 929 Jan 1 00:00 SGO.env
drwxr-xr-x 2 root 0 60 Jan 1 00:00 cgi-bin
-rw-r--r-- 1 root 0 4 Jan 1 00:00 dropbear.pid
crw-rw-rw- 1 root 0 10, 229 Jan 1 00:00 fuse
-rw-r--r-- 1 root 0 4 Jan 1 00:00 httpd.pid
drwxr-xr-x 2 root 0 60 Jan 1 00:00 lock
drwx------ 2 root 0 40 Jan 1 00:20 mc-root
crw-rw-rw- 1 root 0 216, 0 Jan 1 00:00 rfcomm0
crw-rw-rw- 1 root 0 216, 1 Jan 1 00:00 rfcomm1
srw-rw-rw- 1 root 0 0 Jan 1 00:00 sdp
drwxr-xr-x 4 root 0 120 Jan 1 00:00 usb
crw-rw-r-- 1 root 0 10, 250 Jan 1 00:00 vhci
-rw-r--r-- 1 root 0 512000 Jan 1 00:01 vusb
drwxr-xr-x 3 root 0 80 Jan 1 00:00 www

You're know what you're doing... ah

---------- Post updated at 01:02 AM ---------- Previous update was at 12:59 AM ----------

This is the main:

# ls
Java          mnt           mtd_contents  mtd_pers      proc
bin           mtd_acap      mtd_down      mtd_ram       sbin
dev           mtd_appdata   mtd_drv       mtd_rwarea    sys
dtv           mtd_boot      mtd_epg       mtd_swu       usr
etc           mtd_chmap     mtd_exe       mtd_tlib
lib           mtd_cmmlib    mtd_factory   mtd_wiselink
#

You forgot the -l part for / so it didn't tell me much.

But, something just occurred to me. These directories you're mounting -- they contain programs, yes? And I think you're mounting them via CIFS? I have doubts that you can run programs you've mounted over CIFS.

It works on my TV, it is games and music and swf files.
I can play them after run the SamyGO.sh it is shown on my tv all of them stored on the NAS and they are playing. It is only in the shh, I see the denied permission. And yes it is cifs as I know.

Here it comes:

# ls -l
lrwxrwxrwx    1 root     0              15 Jun 26  2009 Java -> mtd_cmmlib/Java
drwxr-xr-x    2 root     0             355 Jan  8  2009 bin
drwxr-xr-x   10 root     0            3357 Jan  8  2009 dev
drwxrwxrwt    7 root     0             340 Jan  1 00:21 dtv
drwxr-xr-x    3 root     0             212 Jan  8  2009 etc
drwxr-xr-x    4 root     0             273 Jan  8  2009 lib
drwxr-xr-x    2 root     0               3 Jan  8  2009 mnt
lrwxrwxrwx    1 root     0              10 Jun 26  2009 mtd_acap -> mtd_rwarea
drwxr-xr-x   18 root     0             260 Aug 16  2009 mtd_appdata
drwxr-xr-x    4 1000     100           140 Jun 26  2009 mtd_boot
lrwxrwxrwx    1 root     0              10 Jun 26  2009 mtd_chmap -> mtd_rwarea
lrwxrwxrwx    1 root     0               7 Jun 26  2009 mtd_cmmlib -> mtd_exe
drwxrwxrwx    4 root     0            8192 Jan  1 00:00 mtd_contents
drwxrwxrwx    3 root     0            4096 Jan  1 00:00 mtd_down
lrwxrwxrwx    1 root     0               7 Jun 26  2009 mtd_drv -> mtd_exe
lrwxrwxrwx    1 root     0              10 Jun 26  2009 mtd_epg -> mtd_rwarea
drwxrwxrwx    5 root     0            8192 Jan  1 00:00 mtd_exe
lrwxrwxrwx    1 root     0              10 Jun 26  2009 mtd_factory -> mtd_rwarea
lrwxrwxrwx    1 root     0              10 Jun 26  2009 mtd_pers -> mtd_rwarea
drwxrwxrwt    2 root     0              60 Jan  1 00:00 mtd_ram
drwxrwxrwx    6 root     0            2048 Jan  1 00:00 mtd_rwarea
drwxrwxrwx    0 root     0           16384 Jan  1 00:00 mtd_swu
drwxrwxrwx    7 root     0           32768 Jan  1 00:00 mtd_tlib
drwxrwxrwx    1 root     0           32768 Jan  1 00:00 mtd_wiselink
dr-xr-xr-x   75 root     0               0 Jan  1 00:00 proc
drwxr-xr-x    3 root     0             571 Feb  4  2009 sbin
drwxr-xr-x   11 root     0               0 Jan  1 00:00 sys
drwxr-xr-x    5 root     0              39 Jan  8  2009 usr
#

But they also contain programs, yes? You're trying to replace your whole SYSROOT?

No, it is the
/mtd_tlib/GGame
/mtd_tlib/swf
Those 2 folders contains
/GGame
The folder SamyGO "That is the setup program"
FTP server
Games

/swf
1.swf
2.swf
etc.
files for showing some videos and play music.

My plan was because there are many games and other stuff on the internet to use on my TV. The TV was almost running out of memory therefore I tried to move the contianing folders to my NAS.

The program patch called SamyGO, are some modificated firmware.

Therefore it is only the folder /mtd_tlib with subfolders.

Since that contains rcSGO, the answer you are reaching for is "yes".

You probably can't run shell scripts (or executables in general) over CIFS, executable bits and the like may not be properly exported.

How about binding just the media subfolders, individually -- not the entire SYSROOT?

Yes could you please help me with that.

---------- Post updated at 02:07 AM ---------- Previous update was at 01:58 AM ----------

there are no files there ending with ".sh" in the library.

Is it possible to mount the mtd_tlib without the SamyGO folder and get the into the GGame folder something like this.

NAS
mount --bind /dtv/usb/sd*/smb/192.192.168.0.100/Qbackup/mtd_tlib/GGame "All folders - except the Samygo folder"

To TV

/mtd_tlib/ "without replace the subfolder SamyGO in GGame folder"

They don't have to be named that.

How about you bind the original, non-CIFS SamyGO folder somewhere else. Then, once you've got the CIFS folders where you want them, bind the somewhere-else back back overtop the SamyGO folder. That should give you the CIFS data folders with the original SamyGO folder overtop.

What a tangled web we weave. At least you can fix this mess with a reboot so far. :slight_smile: