PDA

View Full Version : tyserver & tyindex not starting on boot



mangotango
03-30-2003, 11:27 PM
Been using beta 1 and now at beta 2. Seems to work well. Problem is that tyserver and tyindex don't start upon reboot of the tivo. The following lines were added automaticaly to the very end of my rc.sysinit file

/var/index/tyindex > /dev/null 2>&1 &
/var/index/tyserver > /dev/null 2>&1 &

Are these not supposed to get those two prog. running on boot??? I have to manualy start them after reboot. Any help appreciated.

BareMetal
03-31-2003, 01:01 AM
I have the same issue. But mine did the same thing in beta1. For some reason your rc.sysinit is not getting that far, it is exiting early. You'll just have to go through it and see where this is happening. I'm getting the feeling that this is a common occourance with extreme 3.1 (maybe 2.5 as well) w/ xPlusz.

mangotango
03-31-2003, 09:02 AM
Same problem when i was using beta 1. No big deal, but would like to know whats wrong...

BareMetal
03-31-2003, 09:21 AM
I don't know for sure, I have not had the time to go through my rc.sysinit file to see where it is exiting early at. I would suggest you start looking through that file as a start.

NutMonkey
03-31-2003, 11:35 AM
I have XTreme 2.5 and my rc.sysinit looks like this after installing tyserver:

...
exec < /dev/ttyS3 >& /dev/ttyS3; bash --login

/var/index/tyindex > /dev/null 2>&1 &
/var/index/tyserver > /dev/null 2>&1 &

The problem is the exec command says to stop executing the script and execute the command specified instead (without creating a new process). Therefore anything after the exec will not get executed. The fix is to move the ty lines above the exec call if your file looks the same.

mangotango
03-31-2003, 12:03 PM
Thanks....
Changed my rc.sysinit from

exec < /dev/ttyS3 >& /dev/ttyS3; bash --login

/var/index/tyindex > /dev/null 2>&1 &
/var/index/tyserver > /dev/null 2>&1 &

TO

/var/index/tyindex > /dev/null 2>&1 &
/var/index/tyserver > /dev/null 2>&1 &

exec < /dev/ttyS3 >& /dev/ttyS3; bash --login

Now both files start upon boot. Thanks again.....

Hi8
03-31-2003, 02:37 PM
Originally posted by mangotango
Thanks....
Changed my rc.sysinit from

exec < /dev/ttyS3 >& /dev/ttyS3; bash --login

/var/index/tyindex > /dev/null 2>&1 &
/var/index/tyserver > /dev/null 2>&1 &

TO

/var/index/tyindex > /dev/null 2>&1 &
/var/index/tyserver > /dev/null 2>&1 &

exec < /dev/ttyS3 >& /dev/ttyS3; bash --login

Now both files start upon boot. Thanks again.....

I'm confused .. I don't recall anywhere seeing that you have to START tyindex.

I've read the instructions to run "/var/index/tyserver" but not "/var/index/tyindex".

I've also added /var/index/tyserver > /dev/null 2>&1 & to my rc.sysinit and I haven't had any trouble.

I thought that the indexing was spawned from tyserver by it's own self???

mangotango
03-31-2003, 02:47 PM
Not entirely sure but I believe that the install is "supposed" to the proper mod. to the rc.sysinit file on its own. Why iwas not done properly on mine, i have no idea. After my quick edit both files start on boot and everything seems to be working pretty well.
As far as tyindex.... should this not be running in order that all new recorded shows are automaticaly indexed. I could very well be wrong......

newbie
03-31-2003, 03:28 PM
Both file should be running, otherwise newly recorded shows won't show up in your "now showing".

The install script can't account for all the different modifications people (and scripts) have done to our files. Some people have to manually modify their scripts or manually load the programs after every re-boot.

Hi8
03-31-2003, 03:34 PM
Originally posted by mangotango
Not entirely sure but I believe that the install is "supposed" to the proper mod. to the rc.sysinit file on its own. Why iwas not done properly on mine, i have no idea. After my quick edit both files start on boot and everything seems to be working pretty well.
As far as tyindex.... should this not be running in order that all new recorded shows are automaticaly indexed. I could very well be wrong......

if I do a 'ps aux' I do NOT see tyindex running, but tyserver is. I have not had any problems as I said before, and my shows do show up in NowShowing(tyStudio) as indexed=yes


???

newbie
03-31-2003, 03:39 PM
hi8--tyindex unloaded itself under some circumstances in beta1, I'm not sure if that was fixed in beta 2.

Check your now showing list, shows recorded since tyindex unloaded itself are (probably) missing.

Hi8
03-31-2003, 06:26 PM
Originally posted by newbie
hi8--tyindex unloaded itself under some circumstances in beta1, I'm not sure if that was fixed in beta 2.

Check your now showing list, shows recorded since tyindex unloaded itself are (probably) missing.

you are correct ...

here's my PS AUX output...

root 146 1.7 6.5 2784 1840 ? S 03:03 20:50 /var/index/tyindex
root 147 0.0 0.0 0 0 ? SW 03:02 0:02 /tvbin/tcphonehome
root 148 0.0 0.0 0 0 ? SW 03:02 0:00 /var/index/tyserver

AlphaWolf
03-31-2003, 07:06 PM
Sorry for not noticing this thread earlier. This is a known issue that I have been meaning to address by making the installer put the lines before the call to bash. This is easier said than done however. The problem is, every process needs to be forked in order for the next one to run in rc.sysinit. Bash doesn't automaticaly send itself into the background, so you need to make sure that you add an & at the end of its line, otherwise, anything that follows it in the rc.sysinit will not be executed. Apparently all of the extreme releases cause a problem with this, because they provide rc.sysinits that do not properly fork the bash call.

If you use bash over serial, this is the most proper way to call it:



/bin/bash --login </dev/ttyS3 >& /dev/ttyS3 &

NutMonkey
03-31-2003, 07:25 PM
Alpha,

As an easy fix, I believe that extreme adds the rc.remote-login file (would need to check on that). Maybe the installer could check for the existance of this file and add the lines at the end of it if it exists, otherwise add them to rc.sysinit? It seems like it would fit better in this file anyway, everything else gets started from there.

AlphaWolf
03-31-2003, 07:28 PM
Somebody suggested that earlier, and I did consider it, but when it comes down to issues like these, dealing with non std startup scripts will be a nightmare.

NutMonkey
03-31-2003, 08:32 PM
I see your point, but maybe an exception for extreme would be good, since it's used by lots of people and it's usable by people that don't necessarily know how to edit rc files. People using some other non-standard configuration probably know where to put the ty calls.

AlphaWolf
03-31-2003, 08:55 PM
Well, not all of them do, there are several variations of the origional xtreme.

Pete Ruttman
03-31-2003, 10:05 PM
Thanks for this thread. Finally made me look into my problem. Here's a tail of my rc.sysinit which now works:

tnlited 23 /bin/bash -login &

#added by pete
/var/hack/tivoweb-tcl/tivoweb
/tivo-bin/tivoftpd &
/var/index/tyindex > /dev/null 2>&1 &
/var/index/tyserver > /dev/null 2>&1 &

FreydNot
03-31-2003, 11:33 PM
is rc.sysconfig.author standard for all Tivo's? I know my SA came from the factory already set up to run it if it was present. I have all of my hacks there and run a completely stock rc.sysconfig file.

newbie
04-01-2003, 09:47 AM
This is not a complaint. I don't have the progams auto-load, it was alpha and now beta software and I like knowing if I literally pull the plug the files will get uninstalled although I am soon going to change and edit my scripts. BUT

You can't extract with a standard tivo with a std startup script. The prom has to be flashed, turbonet drivers installed, no scramble enabled, bash enabled etc.

Many (if not most) of the users used a procedure like extreme to handle these issues. I really think you either have to try to address the major variations or DON'T EVEN TRY and let users handle it themselves. Olaf is telling people the progams should re-load after a boot and to post a bug report if it doesn't.






Originally posted by AlphaWolf
Somebody suggested that earlier, and I did consider it, but when it comes down to issues like these, dealing with non std startup scripts will be a nightmare.

BareMetal
04-01-2003, 11:06 AM
Extreme is a nice tool, but people should take the time to learn the basics of the tivo, and not just jump into this expecting everything to be handed to them.

This issue has been brought up on this board, we have found the issue and given a solution to the problem. What is there to gripe about. The program works, the installation script is a bonus. If it does not work perfectly for you, then adjust for it. This is a simple fix, you move two lines in the rc.sysinit file.

I don't think they should have to adjust for the extreme's and Xplusz's and what ever else comes along next. If everyone would take some time to read and learn a little about the system they are working with this would not be an issue. If everyone would just take some time to go through the rc.sysinit file and the files it calls to get an idea to what they are doing. It's just like the "free-tv-ers" of the dss world.

Don't get me wrong, exteme and Xplusz are great tools and I admire the guys who donated their time and knowledge to give us some pretty cool tools for the tivo.

newbie
04-01-2003, 12:17 PM
Bare-Metal--you mis-read my post. I HAVE NO PROBLEM EDITING MY FILES and am not complaining.

My point was there should be better communication, Olaf is telling people to report this as a bug and Alpha Wolf is telling people that his install script won't work with extreme.

People shouldn't be spending the time to try the install many times trying to get it to work when IT WON'T.

I think as peoples machines reboot we're going to see how many people who think the files are automatically loaded are wrong.

My solution would be to elminate that part of the installation script and replace it with instructions. An installation script that doesn't work for a significant part of the user base is of limited value.

I would have made my point via PM to Alpha Wolf but he has that turned off.

AlphaWolf
04-09-2003, 06:15 PM
I am going to automate the entire install process, the problem I have right now though is that I have a lot of school work, and the tivo lacks most of the basic functionality required for doing what I intend to do in bash itself (for this stuff, I have to use tivosh, but I hate relieing on tivosh b/c I don't realy trust it). A few of my tivos use extreme as well, but quite simply, the startup scripts it uses are not standard, and it's normaly up to the user to know that they should properly fork bash when they add it to the rc.sysinit. I have to compromise on several things here. I still may add it to the remote-login script, but I would rather not, as even if I do, that will not fix everybodies problems.

AlphaWolf
04-19-2003, 10:57 PM
Ok I believe I have a solution. Instead of specialy ordering the rc.sysinit, we'll go ahead and replace the faulty call to bash in the rc.sysinit with a corrected call to bash that properly forks. This fix will not only help tyserver, but other problems that I have seen people having that are completely unrelated to tystudio.

There is one issue here though, the method I have chosen to go about this is grossly inefficient. It takes forever just to replace one line in the rc.sysinit. Unfortunately there is no other option if you are using bash on a tivo, the only faster way to do it would be to write a program in C to directly parse the file.

Now, I will go ahead and publish the script that does this, but I must let you know that it is NOT thoroughly tested yet, and may cause your tivo to not boot. This is only a test release to see if I can get a mutual agreement with the community that this is the best way to go about fixing this common problem that most people have.

You can download the script here (http://members.cox.net/alphawolf_/fixinit.sh).

AlphaWolf
04-25-2003, 03:55 PM
So...any comments? This good or bad? yes/no? maybe so?

rc3105
04-30-2003, 08:44 PM
sounds like a plan

one question I have though is why it should take so long??? start searching the last line of rc.sysinit & work back up, use regexp to verify the call to launch bash. should only take a few seconds max. requires tcl but that's no big deal...

what am I missing?

--
Riley

artships
05-01-2003, 12:34 PM
Originally posted by rc3105
why it should take so long???
--Riley

Alphawolf, how about using the -v option of grep to copy all of /etc/rc.d/rc.sysinit except the ttyS3 line, then append the corrected line?



#!/bin/bash

grep -v ttyS3 /etc/rc.d/rc.sysinit > /etc/rc.d/fixinittempsysinit

#the following should be all one line
echo "/bin/bash --login </dev/ttyS3 >& /dev/ttyS3 &" >> /etc/rc.d/fixinittempsysinit

mv /etc/rc.d/fixinittempsysinit /etc/rc.d/rc.sysinit
chmod 755 /etc/rc.d/rc.sysinit
echo "Done! Reboot for changes to take effect."

AlphaWolf
05-01-2003, 04:30 PM
I would rather not alter the order of the rc.sysinit, however, riley gave me a good idea that will make it much quicker...

AlphaWolf
05-01-2003, 05:48 PM
Ok, script updated, gives the same result as the last script (e.g. the rc.sysinit order remains the same, just replaces your bash over serial call), just much quicker this time. You can download it from the same place (http://members.cox.net/alphawolf_/fixinit.sh).

ScubaBudy
05-03-2003, 05:07 PM
Sorry to ask such a dumb question but I forgot how to run this file fixinit.sh what do i do with it? I know I ftp it to my t-60 but what dir and what command do i use to run it?

Thanks for the help!

AlphaWolf
05-11-2003, 12:56 PM
Originally posted by ScubaBudy
Sorry to ask such a dumb question but I forgot how to run this file fixinit.sh what do i do with it? I know I ftp it to my t-60 but what dir and what command do i use to run it?

Thanks for the help!

Just run it like you would run any normal script.