TiVo Community Forum banner
1 - 9 of 9 Posts

· Registered
Joined
·
1,801 Posts
Discussion Starter · #1 ·
I am trying to understand why running the command sh /enhancements/var-symlinks.sh breaks the installs I am trying to protect.

I followed these instructions from DDB /forum/showthread.php?t=53236 which are needed to make NCID work on a S2.5/S3 unit. The application ncid-0.68.tar.gz installs in the /var/hack directory. I then went on to install other aplications then ran this command to update my symlinks then NCID stopped working...

How does this command work? Does it only look one way and lync applications from the /enhancements/varhcaks to the /var/hack directory or does it look both ways?

I also had a problem with installing mfs_ftp. I installed the application in the /enhancements/varhacks directory. I could not get it to run unless I put the drive in RW because it could not write to the cache folder. It would not let me change it back to RO while mfs_ftp was running. To get it to run in RO I had to create the cache folder in /var/mfs_ftp/cache and ran these command to lync it back to the /enhancements/varhacks/mfs_ftp/cache with command(s)

ln -sf /var/mfs_ftp/cache /enhancements/varhacks/mfs_ftp/cache
ln -sf /var/mfs_ftp/port.3105.log /enhancements/varhacks/mfs_ftp/port.3105.log

In other words, I am linking from var to enhancements instead of enhancements to var.

I then went to rock up the machine so I ran sh /enhancements/var-symlinks.sh and now neither NDIC or mfs_ftp works.

I am puzzuled trying to figure out how this command works. Should I just not run this command and build all the symlinks manually?
 

· Registered Abuser
Joined
·
1,397 Posts
Soapm said:
I am puzzuled trying to figure out how this command works. Should I just not run this command and build all the symlinks manually?
If it breaks everything, than yeah that's what I'd do. Never used or looked at the script so I don't know exactly what it does, but symlinks aren't that hard to create manually.
 

· User
Joined
·
3,194 Posts
The script allows you to store hacks in /enhancements/varhacks that normally are installed in /var. The symlinks are stored in /var, and point to the actual hacks in /enhancements/varhacks. The script appends a command to your author file that looks to see if the symlinks are still in /var when you boot, and if they're not (as when /var gets wiped), it runs the script to rebuild them. So instead of installing NCID in /var/hack, you could install it in /enhancements/varhacks/hack, and then run the script to create symlinks in /var/hack. The script is meant to run the hacks included in my enhancement script, which do not include mfs_ftp. The mfs_ftp cache file does indeed require rw access, so the easy fix is to move the cache folder to /var/hack/mfs_ftp. Since mfs_ftp is such a popular tool, I really should modify the symlink script to do this automatically if mfs_ftp is found in the ../varhacks folder. Although I agree creating symlinks is easy, I find creating 10 or 15 of them to be tedius, which is why I wrote the script. The other big advantage is that you don't have to recreate the symlinks every time /var gets wiped.
 

· Registered
Joined
·
1,801 Posts
Discussion Starter · #4 ·
rbautch said:
The mfs_ftp cache file does indeed require rw access, so the easy fix is to move the cache folder to /var/hack/mfs_ftp. Since mfs_ftp is such a popular tool, I really should modify the symlink script to do this automatically if mfs_ftp is found in the ../varhacks folder. Although I agree creating symlinks is easy,....
Thanks for the explination, I will move NCID to .../varhacks which should solve that problem. Nothing like more learning!!!

I did create the cache folder in /var/hack... I then entered this command to create the lync

ln -sf /var/mfs_ftp/cache /enhancements/varhacks/mfs_ftp/cache

Any idea why sh /enhancements/var-symlinks.sh breaks or messes up mfs_ftp? I start getting the RW error again after running this command.
 

· User
Joined
·
3,194 Posts
Soapm said:
Thanks for the explination, I will move NCID to .../varhacks which should solve that problem. Nothing like more learning!!!

I did create the cache folder in /var/hack... I then entered this command to create the lync

ln -sf /var/mfs_ftp/cache /enhancements/varhacks/mfs_ftp/cache

Any idea why sh /enhancements/var-symlinks.sh breaks or messes up mfs_ftp? I start getting the RW error again after running this command.
You're getting the RW error because you are creating a symlink in /enhancements/varhacks/mfs_ftp while you have your filesystem mounted read-only. First, you can't create anything on your root filesystem while it's in a read-only state, and second, you don't need to create that link at all. You need to move the actual cache folder from /enhancements/varhacs/mfs_ftp to /var/mfs_ftp, overwriting the cache symlink that the script originally created. To see your symlinks, type ls -l in the directory containing the links.
 

· Registered
Joined
·
1,801 Posts
Discussion Starter · #7 ·
Ok, I turned the drive RW. then did a

rm -r /var/mfs_ftp/cache

because I kept getting an error. I then did a

cp -pr /enhancements/varhacks/mfs_ftp/cache /var/mfs_ftp/

I turned the drive RO and started mfs_ftp and it appears to be working for now. Thanks for all the help. I think I'm actually beginning to understand what I'm doing...
 

· Registered
Joined
·
1,801 Posts
Discussion Starter · #8 ·
I think I had a revalation...

As I install hacks in the /enhancements/varhacks folder, I have been changing all the entries in every config file (to include Author) to /enhancements/varhacks

This is my problem, I should leave all the entries (to include Author) as /var because the symlink simulates or virtually places the program in the /var folder. There should really be no need to change any config entries. Also, since the /var is RW the programs will actually work better from /var

Am I on the right track?
 

· User
Joined
·
3,194 Posts
Soapm said:
I think I had a revalation...

As I install hacks in the /enhancements/varhacks folder, I have been changing all the entries in every config file (to include Author) to /enhancements/varhacks

This is my problem, I should leave all the entries (to include Author) as /var because the symlink simulates or virtually places the program in the /var folder. There should really be no need to change any config entries. Also, since the /var is RW the programs will actually work better from /var

Am I on the right track?
Yes!
 
1 - 9 of 9 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top