Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: bigpcman on January 30, 2010, 09:53:22 AM

Title: having trouble with "dummy" tcz with startup script - won't execute
Post by: bigpcman on January 30, 2010, 09:53:22 AM
I'm trying out the technique of creating a "dummy" tcz which contains a script I want executed when the tcz is installed.

I created a script named mystartup which just  echos a message to a test_flag file. Then I created a test script file in /tmp/package that copies the mystartup file to /tmp and executes it.

I performed a mksquashfs on the test script file (mksquashfs package test.tcz) and moved the test.tcz into the ../tce/optional directory.
I updated the onboot list file with the new test.tcz file name.

When I boot the test.tcz extension is installed and /tmp/tcloop/test contains the "test" script file. Not a link the actual "test" script file.

However, the "test" script file was not executed when the extension was installed.

So what am I doing wrong?

Title: Re: having trouble with "dummy" tcz with startup script - won't execute
Post by: gerald_clark on January 30, 2010, 09:58:29 AM
Your dummy extension must contain a script of the same name in
usr/local/tce.installed

That script is executed.
Title: Re: having trouble with "dummy" tcz with startup script - won't execute
Post by: bigpcman on January 30, 2010, 10:01:32 AM
Your dummy extension must contain a script of the same name in
usr/local/tce.installed

That script is executed.

Do you mean:  /package/usr/local/tce.installed/test before the mksquashfs is performed?
Title: Re: having trouble with "dummy" tcz with startup script - won't execute
Post by: roberts on January 30, 2010, 10:38:20 AM
If the script is named mystartup and is located at
  usr/local/tce.installed/mystart

Then the extension had better be called mystart.tcz

If using test.tcz then rename the script to test
  usr/local/tce.installed/test
and remake the extension.

The script name needs to match the base extension name.
Title: Re: having trouble with "dummy" tcz with startup script - won't execute
Post by: bigpcman on January 30, 2010, 10:47:28 AM
If the script is named mystartup and is located at
  usr/local/tce.installed/mystart

Then the extension had better be called mystart.tcz

If using test.tcz then rename the script to test
  usr/local/tce.installed/test
and remake the extension.

The script name needs to match the base extension name.
Thanks for the tip.
 I knew about the naming rules but I didn't understand that the script had to be in
/tmp/package/usr/local/tce.installed/ - full path with proper ownnership and permissions. I missed that part.

So when I put the script in the right place and performed the mksquashfs operation on /tmp/package again it now works as it should. Good stuff!