Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: AlabamaPaul on August 18, 2014, 03:20:35 PM

Title: /home/tc/.profile within an extnsion
Post by: AlabamaPaul 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
Title: Re: /home/tc/.profile within an extnsion
Post by: gerald_clark 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.
Title: Re: /home/tc/.profile within an extnsion
Post by: AlabamaPaul 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.
Title: Re: /home/tc/.profile within an extnsion
Post by: gerald_clark 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.
Title: Re: /home/tc/.profile within an extnsion
Post by: AlabamaPaul 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.
Title: Re: /home/tc/.profile within an extnsion
Post by: gerald_clark 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.
Title: Re: /home/tc/.profile within an extnsion
Post by: AlabamaPaul 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
Title: Re: /home/tc/.profile within an extnsion
Post by: coreplayer2 on August 19, 2014, 11:30:32 AM
How about the updated file was included in a backup.. ??
Title: Re: /home/tc/.profile within an extnsion
Post by: AlabamaPaul on August 19, 2014, 11:48:39 AM
There is no backup
Title: Re: /home/tc/.profile within an extnsion
Post by: coreplayer2 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)