WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: having trouble with "dummy" tcz with startup script - won't execute  (Read 2159 times)

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
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?

« Last Edit: January 30, 2010, 12:55:03 PM by bigpcman »
big pc man

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: having trouble with "dummy" tcz with startup script - won't execute
« Reply #1 on: January 30, 2010, 12:58:29 PM »
Your dummy extension must contain a script of the same name in
usr/local/tce.installed

That script is executed.

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: having trouble with "dummy" tcz with startup script - won't execute
« Reply #2 on: January 30, 2010, 01:01:32 PM »
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?
big pc man

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: having trouble with "dummy" tcz with startup script - won't execute
« Reply #3 on: January 30, 2010, 01:38:20 PM »
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.
10+ Years Contributing to Linux Open Source Projects.

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: having trouble with "dummy" tcz with startup script - won't execute
« Reply #4 on: January 30, 2010, 01:47:28 PM »
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!
big pc man