Tiny Core Linux

Tiny Core Base => TCB Tips & Tricks => Topic started by: bigpcman on February 09, 2009, 05:04:34 PM

Title: Turn mydata.tgz into a tce extension
Post by: bigpcman on February 09, 2009, 05:04:34 PM
I'm not sure how useful this is but I found it interesting that it looks like simply renaming the backup file mydata.tgz  to mydata.tce turns it into an extension that can then be loaded like any other. I know there can be "timing issues" with some of the files that are normally in the backup file but that aside the .filelist,  menu tool / add to filelist and panel backup button can all be used to make an extension.
Title: Re: Turn mydata.tgz into a tce extension
Post by: clivesay on February 09, 2009, 05:12:40 PM
Yes, you are correct.

Not sure if Robert still has the extensions loaded alphabetically. If they do, then just give your data extension a name that starts with "zz" or something to ensure it's loaded last. That way, your config files will be the last thing loaded and will overlay any default files from the applications.

Chris
Title: Re: Turn mydata.tgz into a tce extension
Post by: ^thehatsrule^ on February 09, 2009, 05:52:15 PM
Yes, they are loaded alphabetically - first .tce's then .tcz's, if that matters.
Title: Re: Turn mydata.tgz into a tce extension
Post by: MakodFilu on February 20, 2009, 02:08:55 AM
I wonder if at boot time, with tcelocal= variable set (or whatever is it named), one could also specify tceload=file-without-path.tce

That way, i18n and L10n, customization, branding and whatever could be accomplished by simply adding a directory and editing a syslinux.cfg/ isolinux.cfg simple line.

If that data/config/dummy .tce have an associated .dep, it could also install some other .tce's at boot time.
Title: Re: Turn mydata.tgz into a tce extension
Post by: softwaregurl on February 21, 2009, 08:34:16 PM
Quote
If that data/config/dummy .tce have an associated .dep, it could also install some other .tce's at boot time.
.deps are ignored on boot.
Quote
they are loaded alphabetically - first .tce's then .tcz's
Roberts decided to do it this way to simplify and speed the boot process.  I'm sure a .tce could have just /opt/bootlocal.sh which in turn loads another with a .dep as they are obeyed when loading from optional.  It might be handy to grab a dummy extension from your local web server to load everything you normaly want.

I've been using mydata.tce to load things like hardware support (have to modprobe my ethernet card) almost from the beginning but i still use a backup.  This just makes it easier to start a new tce directory with nothing but the essentials.

I think this might have been answered elsewhere but, is everything downloaded and installed in the order it's listed in the .dep and does everything happen localy so it makes no difference if I change mirrors or is anything other then the search server side?
Title: Re: Turn mydata.tgz into a tce extension
Post by: mikshaw on February 22, 2009, 03:12:34 AM
Code: [Select]
   DEPLIST="$EXTENSION".dep
   wget -q "$PROTOCOL"://"$MIRROR"/"$REPOSITORY"/"$DEPLIST" 2>/dev/null
   if [ "$?" == 0 ]; then
      for F in `cat "$DEPLIST"`; do
         if [ ! -f /usr/local/tce.installed/"${F%.*}" ]; then
            wget -q "$PROTOCOL"://"$MIRROR"/"$REPOSITORY"/"$F".md5.txt
            if [ -z "$DISPLAY" ]; then
              wget "$PROTOCOL"://"$MIRROR"/"$REPOSITORY"/"$F"
            else
              aterm +tr +sb -bg white -fg black -geometry 80x4 -e wget "$PROTOCOL"://"$MIRROR"/"$REPOSITORY"/"$F" 2>/dev/null
            fi
            busybox md5sum -cs "$F".md5.txt
            if [ $? != 0 ]; then
               cd ~; exit 1;
            else
               install "$F" "$2" "$3"
            fi
         fi
      done
It looks like it's done in the order listed in the dep file.
It shouldn't make a difference which mirror, assuming it is a true mirror and not an evil plot  by some mad server admin to install our applications in the wrong order.