Tiny Core Linux
		Tiny Core Base => TCB Bugs => Topic started by: danielibarnes on February 24, 2009, 02:30:18 PM
		
			
			- 
				I noticed that when tc-config searches for startup scripts (find /usr/local/tce.installed/ -perm -755 -type f) it will not load startup scripts included in a .tcz because they are symbolic links instead of files. I had to include a user.tar.gz in my .tcz extension. Is this a bug or by design? Am I using the feature properly?
			
- 
				Is it important that your scripts need to be symoblic links? A wrapper script can be used to accomplish basically the same thing as a link:
 
 #!/bin/sh
 exec /path/to/my/startup_script
- 
				When loaded, a .tcz extension is loop mounted on /tmp/tcloop/BASENAME. Symbolic links which point to all of the files in the extension are created on the root filesystem (similar to cp -lr). This is a feature of Tiny Core Linux.
			
- 
				I noticed that "tce-load" does not check for startup scripts. Can someone with the knowledge please tell me how this should work? I thought that the startup scripts feature was a sort of "autorun" for extensions. Is this not correct?
			
- 
				Perhaps it is only used for auto-loaded extensions?  I noticed that adding a script to tclocal directory will run during boot even if that script has nothing to do with tce packages.  As a result I put my  persistent bootlocal script there.  I'm guessing it doesn't apply to tce-load, although I'm too sleepy to check it at the moment.
			
- 
				The startup script support was for Sytem Startup, i.e., booting, but can and will be extended for dynamic extension processing (tce-load). However, they are not an autorun for extensions for the following reasons...
 
 There is a big difference. During booting, no login has occured. No X started. No paths sets. During booting it is like an rc level script. With dynamic loading (tce-load), X is typically up and user is loggged in. Paths are set. Therefore, startup scripts are not an autorun for extensions.
 
 
- 
				I misunderstood the startup script myself thinking they were run when an extension was loaded, and that is why bash sometimes works and sometimes doesn't since the startup script creates the /bin/bash symlink if it is not there.  It only works from a reboot and not fresh from the appbrowser. Of course, I always use test cases  in the startup scripts to see if an action like adding users or creating symlinks or copying files has taken place.  
 
 I understand that there is a difference in the state of the system at boot compared to normal.  I didn't read clearly in Robert's post if the startup scripts will be run with tce-load or not.  If not I will change the startup scripts for my extensions like bash so they will work in all cases.
 
 
- 
				I just checked the tce-load from 1.2rc2, it does check for a startup script. Is here some misunderstanding?
			
- 
				I don't see it in 1.1, so maybe it's new.
 All I see is a check for deps.
- 
				I am on Windows now, but I will look into my setup when I get home.  But I do remember a bash issue, though I could have been using an earlier TC version.  If tce-load already executes the scripts, then cool beans.  If not, I will go from there.
			
- 
				I will add startup script processing to tce-load in next cut.
			
- 
				Yes. Startup script is there already. Perhaps we need it to be sudo ?
			
- 
				Another oversight of mine while away from home, as rc2 does execute startup scripts with the appbrowser or tce-load.  Tested bash and it works.  
			
- 
				I see now what I misunderstood. On startup, tc-config finds all files within /usr/local/tce.installed that have 755 permissions and executes them, so I called my startup script "something.sh". tce-load checks for a file which has the same name as the extension and executes it, so that's why it didn't work for me. I just need to rename my file to remove the ".sh" suffix.
 
 Thanks,
 Daniel