WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: /home/tc/.profile within an extnsion  (Read 4423 times)

Offline AlabamaPaul

  • Newbie
  • *
  • Posts: 34
/home/tc/.profile within an extnsion
« on: August 18, 2014, 03:20:35 PM »
I am in the process of updating a system that uses Tiny Core 3.x to using 5.x.

This system uses a local extension that includes /home/tc/.profile to control what is executed when the autologin occurs.

This works great with TC3.x, but in 5.3 the extension does not replace the standard /home/tc/.profile script.

Is there something special in Tiny Core 5.3 that I need to do to ensure the /home/tc/.profile from the extension replaces the normal /home/tc/.profile?

Thanks,
Paul

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: /home/tc/.profile within an extnsion
« Reply #1 on: August 18, 2014, 03:25:29 PM »
/home is in the backup.  That includes /home/tc/.profile.
After extensions are loaded, the backjup is extracted.

What exactly are you trying to run?
If it is a GUI application, the startup script belongs in ~/.X.d.

Offline AlabamaPaul

  • Newbie
  • *
  • Posts: 34
Re: /home/tc/.profile within an extnsion
« Reply #2 on: August 18, 2014, 03:36:07 PM »
There should be no backup, and the behavior is the same even if I specify "norestore" when booting into TinyCore.

No GUI, it is all text based.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: /home/tc/.profile within an extnsion
« Reply #3 on: August 18, 2014, 03:45:03 PM »
Double check your extension then, because unless .profile is being restored from a backup, it should not be overwritten.

Offline AlabamaPaul

  • Newbie
  • *
  • Posts: 34
Re: /home/tc/.profile within an extnsion
« Reply #4 on: August 18, 2014, 04:27:42 PM »
I double checked the extension using "unsquashfs -ll EXTENSION_NAME.tcz" and verified the home/tc/.profile was in the extension.

I also tried waiting and loading the extension from the command line after booting, and again /home/tc/.profile was not changed.
After manually loading the extension, I checked to see that /tmp/tcloop/EXTENSION_NAME/home/tc/.profile existed and was the expected file which lets me know the file is in the extension.
« Last Edit: August 18, 2014, 04:36:05 PM by AlabamaPaul »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: /home/tc/.profile within an extnsion
« Reply #5 on: August 18, 2014, 04:39:45 PM »
When installing an extension, existing files will not be overwritten.
You need to modify your tce.installed script to copy the file.

Offline AlabamaPaul

  • Newbie
  • *
  • Posts: 34
Re: /home/tc/.profile within an extnsion
« Reply #6 on: August 19, 2014, 08:32:36 AM »
Thanks for the help!

I added the usr/local/tce.installed/EXTENSION_NAME script to the extension that copied the .profile file and this now works with 5.3.

I am just puzzled how this has worked for over 2 years with TinyCore 3.x

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: /home/tc/.profile within an extnsion
« Reply #7 on: August 19, 2014, 11:30:32 AM »
How about the updated file was included in a backup.. ??

Offline AlabamaPaul

  • Newbie
  • *
  • Posts: 34
Re: /home/tc/.profile within an extnsion
« Reply #8 on: August 19, 2014, 11:48:39 AM »
There is no backup

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: /home/tc/.profile within an extnsion
« Reply #9 on: August 19, 2014, 12:05:46 PM »
I believe it's been said before, that files in extensions do not overwrite existing files by default, unless the extension accommodates a copy and overwrite in it's start script.   either that the original has been modified,  or there was a backup.  those are the only three ways to update an existing file afaik.   iirc tc-3.x didn't perform any differently..

At least you've got it figured out now for tc-5.x  8)