WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: ondemand with read-only /tce [was Re: tinycore_v3.1rc4]  (Read 3245 times)

Offline ixbrian

  • Administrator
  • Sr. Member
  • *****
  • Posts: 436
ondemand with read-only /tce [was Re: tinycore_v3.1rc4]
« on: September 07, 2010, 08:55:28 PM »
Hello,
The new ondemand functionality is awesome.  I have one suggestion; would it be possible to modify the ondemand script so that it can handle it if your tce directory is on a read only filesystem (for example when on CD media)?  Currently it fails because it is trying to create several directories and files.  

I did a quick stab at this; here is what I changed in /usr/bin/ondemand and it seems to work, although I haven't been able to do much testing:

-After setting $TCEDIR from /opt/.tce_dir, try touching a file on $TCEDIR and if it is successful set new variable $WRITEDIR equal to $TCEDIR.    If it is not successful (it is a read only filesystem) then set $WRITEDIR to somethnig like /tmp/ondemand that is writeable

-Change several of the current $TCEDIR references where new ondemand files are being written to $WRITEDIR.  

Thanks,
Brian

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: ondemand with read-only /tce [was Re: tinycore_v3.1rc4]
« Reply #1 on: September 07, 2010, 09:33:43 PM »
Hello,
The new ondemand functionality is awesome.  I have one suggestion; would it be possible to modify the ondemand script so that it can handle it if your tce directory is on a read only filesystem (for example when on CD media)?  Currently it fails because it is trying to create several directories and files. 

I did a quick stab at this; here is what I changed in /usr/bin/ondemand and it seems to work, although I haven't been able to do much testing:

-After setting $TCEDIR from /opt/.tce_dir, try touching a file on $TCEDIR and if it is successful set new variable $WRITEDIR equal to $TCEDIR.    If it is not successful (it is a read only filesystem) then set $WRITEDIR to somethnig like /tmp/ondemand that is writeable

-Change several of the current $TCEDIR references where new ondemand files are being written to $WRITEDIR. 

Thanks,
Brian


I don't want to prolong the release of 3.1.
 
Each change that I make takes so many hours of testing with all the permutations and combinations that exist with Core. I am glad that community helps test and jls for pointing out the variable device name issue with pendrives in rc3. The change log for 3.1 is already quite long.

Will re-visit when 3.2 has begun and I am fresh to begin anew with all the testing that is required.
10+ Years Contributing to Linux Open Source Projects.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10982
Re: ondemand with read-only /tce [was Re: tinycore_v3.1rc4]
« Reply #2 on: September 08, 2010, 09:11:42 AM »
ixbrian, I'm missing why one would store ondemand files in ram (ie lose on reboot)?
Or did you mean to auto-add that dir to filetool.lst if it's used?
The only barriers that can stop you are the ones you create yourself.

Offline ixbrian

  • Administrator
  • Sr. Member
  • *****
  • Posts: 436
Re: ondemand with read-only /tce [was Re: tinycore_v3.1rc4]
« Reply #3 on: September 08, 2010, 03:20:39 PM »
ixbrian, I'm missing why one would store ondemand files in ram (ie lose on reboot)?
Or did you mean to auto-add that dir to filetool.lst if it's used?

For example, if you remastered a Tiny Core CD, you could add your extensions to a tce directory on the CD image, and then simply add "ondemand firefox.tcz"  in a startup script on your remaster.   Since the ondemand script only needs to take a quick look at the main extension and not all of the dependencies, this should be fast enough to have run at every boot (and would be much faster than a normal tce-load of the extension). 

There are probably several other ways support could be added for easily creating a remaster CD that supports ondemand, this just seemed like one of the simplest ways to do it. 

Brian


Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10982
Re: ondemand with read-only /tce [was Re: tinycore_v3.1rc4]
« Reply #4 on: September 09, 2010, 12:39:10 AM »
Since those files can be pre-generated and stored on the cd, why not do the work only once?
The only barriers that can stop you are the ones you create yourself.

Offline ixbrian

  • Administrator
  • Sr. Member
  • *****
  • Posts: 436
Re: ondemand with read-only /tce [was Re: tinycore_v3.1rc4]
« Reply #5 on: September 09, 2010, 04:35:38 AM »
Since those files can be pre-generated and stored on the cd, why not do the work only once?

You're right, that would be even better.   If support was added to /usr/bin/ondemand to pre-generate these files (without changing anything on the running system) then this would work great.  

For example, if you could run something like "ondemand firefox.tcz /tmp/remaster/tce" and it would just generate the startup script and extract the icon and write them to the specified directory (into ondemand and ondemand.ico directories) without changing anything else, that would work great.  

Thanks,
Brian
« Last Edit: September 09, 2010, 04:37:51 AM by ixbrian »

Offline tclfan

  • Sr. Member
  • ****
  • Posts: 286
Re: ondemand with read-only /tce [was Re: tinycore_v3.1rc4]
« Reply #6 on: September 09, 2010, 07:10:25 AM »
ixbian,
So what do we need to accomplish this? Do we have all the pieces in the current version available or we need to have this support added to make this practically available to the user?
In other words, is there anything that need to ask roberts to add to provide such support?