PDA

View Full Version : tvapppatch.tcl returns file not found, Any thoughts about why?



doc_b
10-04-2011, 11:42 PM
Hi, I have successfully prom modded and applied the basic hacks to my 2 tivo HD units, i.e. modified the kernel and added Alpha Wolf's tools and I can successfully telnet to the boxes. My problem comes about when I try to use tvapppatch.tcl

At first I received a Permission denied error when using ./tvapppatch.tcl -t /sbin/tivoapp in my hacks directory. I checked and found that my root was read only so I remounted that read write. I also made tvapppatch executable with chmod 777. I'm not sure if that step was necessary. Now all I get is ./tvapppatch.tcl: No such file or directory. I have tried putting the files in the root directory and just about every variation of how to call tvapppatch to no avail. I also always make sure tvapppatches.tcl is in the same directory. Has anyone encountered this and if so how do you fix it??

Thanks,
Michael

mike_s
10-05-2011, 07:52 AM
tivo app is normally in /tvbin, not /sbin. Are you in the same directory as tvapppatch.tcl when trying to run it? What do the following commands return?


which tivoapp
which tvapppatch.tcl
echo $PATH

doc_b
10-05-2011, 01:08 PM
Sorry, that was a typo above I meant to say /tvbin not /sbin

Here are some examples of what I have tried thus far. I have tried these with tvapppatch.tcl and tvapppatches.tcl in my /var/hacks directory as well as in /

bash-2.02# ./tvapppatch.tcl -p /tvapppatches.tcl -t /tvbin/tivoapp.orig -verbose yes
bash: ./tvapppatch.tcl: No such file or directory
bash-2.02# ./tvbin/tvapppatch.tcl -p /tvbin/tvapppatches.tcl -t /tvbin/tivoapp.orig -verbose yes
bash: ./tvbin/tvapppatch.tcl: No such file or directory
bash-2.02# /tvbin/tvapppatch.tcl -p /tvbin/tvapppatches.tcl -t /tvbin/tivoapp.orig -verbose yes
bash: /tvbin/tvapppatch.tcl: No such file or directory
bash-2.02# /tvbin/tvapppatch.tcl -p /tvbin/tvapppatches.tcl -t /tvbin/tivoapp.orig -verbose yes
bash: /tvbin/tvapppatch.tcl: No such file or directory

Here are the results from the commands you posted

bash-2.02# echo $PATH
./:.:/bin:/sbin:/tvbin:/tivo-bin
bash-2.02# which tivoapp
./tivoapp
bash-2.02# which tvapppatch.tcl
./tvapppatch.tcl
bash-2.02#


Thanks,
Michael

doc_b
10-05-2011, 01:29 PM
Also here are the steps I was taking starting from root

bash-2.02# cd var/hacks
bash-2.02# ls
Gen06-netopt-ext3.tar.bz2 tvapppatch.tcl
kernel-backup tvapppatches-11.0k.tcl
tivotools.tar tvapppatches.tcl
bash-2.02# ./tvapppatch.tcl -p /var/hacks/tvapppatches.tcl -t /tvbin/tivoapp -verbose yes
bash: ./tvapppatch.tcl: No such file or directory
bash-2.02#

Thanks,
Michael

ScanMan
10-05-2011, 01:36 PM
The tvapppatch(es) file(s) may be in a DOS style rather than UNIX. If you 'cat' them and see the ^M characters - those are dos-style line endings. You can either run 'dos2unix' from AlphaWolf's tools or convert them (if necessary) off-line and ftp them back up. Make sure you transfer .tcl files in BINARY if you FTP them up; that may be how they got screwed up in the first place.

doc_b
10-05-2011, 01:41 PM
thanks that looks like my problem. I'll give it a shot after work and post my results. Thanks for the help!

mike_s
10-05-2011, 01:46 PM
In every case, you're telling it to modify /tvbin/tivoapp.orig It's not clear what directory you were in when you ran those commands, since they show both tivoapp and tvapppatch.tcl in the current directory (tivoapp shouldn't be anywhere but in /tvbin, and tvapppatch shouldn't be there)???

It's a bad idea to have the current directory (.) first on your path. Not sure why you have both . and ./ there, either.

The application is /tvbin/tivoapp, did you make a copy and name it tivoapp.orig?

What happens when you just do a "tvapppatch.tcl -help" ?

doc_b
10-05-2011, 09:27 PM
Ok, I re-downloaded tvapppatch.tcl and the appropriate tvapppatches.tcl for my SW version (11K). I also changed the tvapppatches-11.0k.tcl file to the default filename of tvapppatches.tcl. I then uploaded them to /var/hacks and ran dos2unix on each file just to be sure. I then ran cat on each file and found no dos end of line characters. I then did the following starting in root.

bash-2.02# mount
/dev/hda4 on / type ext2 (rw)
/dev/hda9 on /var type ext2 (rw)
/proc on /proc type proc (rw)
bash-2.02# cd /var/hacks
bash-2.02# ls
Gen06-netopt-ext3.tar.bz2 tvapppatch.tcl
kernel-backup tvapppatches.tcl
tivotools.tar
bash-2.02# tvapppatch.tcl
bash: .//tvapppatch.tcl: Permission denied
bash-2.02#

As I understand it this shows my root is mounted read/write. I then changed to my /var/hacks directory and ran tvapppatch.tcl......and received permission denied. Not really sure at this point what I am doing wrong.
Below is my rc.sysinit.author file just for my path references. Mike, are . and ./ synonymous? also why is it bad to have (.) the current directory first in your path list? Thanks Again.

#!/bin/bash
export PATH=./:.:/bin:/sbin:/tvbin:/tivo-bin:/var/hacks
export TIVO_ROOT=
export MFS_DEVICE=dev/hda10
#serial bash..
/bin/bash</dev/ttyS1&>/dev/ttyS1&
#telnet
/sbin/tnlited 23 /bin/bash -login &
#ftp
/tivo-bin/tivoftpd

doc_b
10-05-2011, 09:30 PM
Sorry, forgot this running tvapppatch.tcl -help returns the following:

bash-2.02# tvapppatch.tcl -help
bash: .//tvapppatch.tcl: Permission denied

mike_s
10-06-2011, 06:40 AM
permissions problem. looks like you forgot to chmod tvapppatch