WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Survival questions  (Read 3338 times)

Offline zab

  • Jr. Member
  • **
  • Posts: 51
Survival questions
« on: June 09, 2010, 05:25:38 PM »
Hi List,

It's my second days living with TCL ("tinycore_2.11.3.iso").
I've a couple of questions please:

1. How can I easily delete an extension?
2. I figured out how to install my extensions and make them permanent by backing them up
and restore them (thanks ".filetool.lst"). But this is a bit annoying as my boot time is much longer
now. Is it possible to have them installed forever (under /usr/local) without beign forced to mount them
(even if the process is automatic) after each reboot?
3. How do I set "bash" as my default shell permanently (even after a reboot).
4. I'm looking after "zlib" extension. Juanito seems to have package it under "base-dev" (see http://forum.tinycorelinux.net/index.php?topic=6256.0). If I've an extension which depends on "zlib", should I put "base-dev" instead of "zlib" in the ".dep" file or should I leave it without?

Thanks in advance.

Regards
Zab

Offline althalus

  • Sr. Member
  • ****
  • Posts: 351
Re: Survival questions
« Reply #1 on: June 09, 2010, 05:42:55 PM »
Hi List,

It's my second days living with TCL ("tinycore_2.11.3.iso").
I've a couple of questions please:

1. How can I easily delete an extension?
Just delete the files. It's always a good idea to make sure the extension isn't loaded at the time.
Quote
2. I figured out how to install my extensions and make them permanent by backing them up
and restore them (thanks ".filetool.lst"). But this is a bit annoying as my boot time is much longer
now. Is it possible to have them installed forever (under /usr/local) without beign forced to mount them
(even if the process is automatic) after each reboot?
Wait, your using backups to manage your extensions!? Look into using the bootcode tce. Typically, you'd use tce=sda1 for a harddrive install, but that will depend on both the hardware you are using and the type of setup you are using.
Quote
3. How do I set "bash" as my default shell permanently (even after a reboot).
One method would be to edit /etc/passwd, find the line that starts with tc and change the /bin/sh at the end of it to /bin/bash. Then add /etc/passwd to your backup.
Quote
4. I'm looking after "zlib" extension. Juanito seems to have package it under "base-dev" (see http://forum.tinycorelinux.net/index.php?topic=6256.0). If I've an extension which depends on "zlib", should I put "base-dev" instead of "zlib" in the ".dep" file or should I leave it without?
Base-dev is really only the development files, which means the zlib libraries are more than likely going to exist in the base, which means you don't need to mention it at all in the dep files of any extensions you're using.

Offline zab

  • Jr. Member
  • **
  • Posts: 51
Re: Survival questions
« Reply #2 on: June 09, 2010, 06:23:49 PM »
1.
Quote
Quote
1. How can I easily delete an extension?
Just delete the files. It's always a good idea to make sure the extension isn't loaded at the time.
A bit lost. Where are they (i.e these extensions) "althalus"?

2.
Quote
Wait, your using backups to manage your extensions!? Look into using the bootcode tce. Typically, you'd use tce=sda1 for a harddrive install, but that will depend on both the hardware you are using and the type of setup you are using.
Hmmm ... I've missed that (http://wiki.tinycorelinux.com/Boot+codes+explained). Thanks.

One more thing "althalus". Is there a doc somewhere which explains how to start "services" (as in Debian/Fedora, like /etc/init.rd/apached) in TCL. What I'd like to get by the end of the day is my Apache running just after the boot.

Regards
Zab
 
« Last Edit: June 09, 2010, 06:29:10 PM by zab »

Offline batnas

  • Full Member
  • ***
  • Posts: 122
Re: Survival questions
« Reply #3 on: June 09, 2010, 06:39:13 PM »
A bit lost. Where are they (i.e these extensions) "althalus"?

They are in your tce-directory. If you use bootcodes to define a persistent tce-directory, you specify your tce-dir with them (bootcodes)
And also, you can always find your tce-dir by typing cat /opt/.tce_dir

One more thing "althalus". Is there a doc somewhere which explains how to start "services" (as in Debian/Fedora, like /etc/init.rd/apached) in TCL. What I'd like to get by the end of the day is my Apache running just after the boot.

I'm not sure about services, but you can execute code after boot by editing /opt/bootlocal.sh
You should add something like /usr/bin/apache
(I am not sure if that is correct for apache)

\\Batnas

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Survival questions
« Reply #4 on: June 09, 2010, 07:45:36 PM »
To expand a bit on an earlier answer: According to the .info file of apache2.tcz the startup command is: sudo apachectl -k start

There are several different files that can be used for executing commands at startup:
  • /opt/bootlocal.sh is executed as 'root' (so does not need commands to be preceded with sudo) before any user process (e.g. the X server) is running. Since it gets called in an asynchronous way there is a small chance of a race condition. It is typically seen as the best place to start services like a web server or set up WLAN.
  • files in ~/.X.d (e.g. '~/.X.d/wbar') are executed as the respective user (e.g. 'tc') after the X server and the WM are running. This would be a suitable place for GUI applications run by the user (e.g. a clock applet).
  • ~/.profile (and ~/.ashrc) can be used to include settings (or execute commands) that are user-specific and apply to each shell used by the user. For system wide amendments (i.e. all users including 'root') all /etc/profile.d/*.sh files will be sourced from the system-wide profile (i.e. /etc/profile).

In any case it is the users obligation to ensure (e.g. by inclusion to the backup) that changes to any of those files "survive" the next reboot.

Offline althalus

  • Sr. Member
  • ****
  • Posts: 351
Re: Survival questions
« Reply #5 on: June 09, 2010, 07:52:14 PM »
1.
Quote
Quote
1. How can I easily delete an extension?
Just delete the files. It's always a good idea to make sure the extension isn't loaded at the time.
A bit lost. Where are they (i.e these extensions) "althalus"?
Following on from my previous example of booting with tce=sda1, extensions would exist in /mnt/sda1/tce/optional/
Quote
One more thing "althalus". Is there a doc somewhere which explains how to start "services" (as in Debian/Fedora, like /etc/init.rd/apached) in TCL. What I'd like to get by the end of the day is my Apache running just after the boot.
Maro and batnas have already given you good answers to this, but I will add that applications that include init scripts will usually put them in /usr/local/etc/init.d/ and you can start them on boot by:
1) make sure the extension is in your onboot list.
2) add
Code: [Select]
/usr/local/etc/init.d/appropriate-script-for-app start
Also see the services applet in the control panel for a simple gui for starting and stopping services - this won't help you start an application on boot, however.

Offline thane

  • Hero Member
  • *****
  • Posts: 697
Re: Survival questions
« Reply #6 on: June 09, 2010, 08:02:23 PM »
I'm not sure how you installed Tiny Core, but extensions are supposed to be stored in the 'optional' directory under the 'tce' directory (which is usually under /mnt/sda1/ or /mnt/hda1/). They are normally not modified except by the appbrowser or appsaudit [sic?] functions. The appbrowser will put any extensions you download in that /tce/optional/ directory. Appsaudit has features for updating and removing extensions for there as well.

Extensions do not have to be backed up or restored and should not be listed in .filetool.lst. This is normally used for settings and preferences files. You probably should leave it alone unless the info for the extension says to add something to it.

Not sure what you're looking for, but there are several threads on automatically starting apps when you boot. Search for 'start' or 'autostart' in the forum (see search button at the top of this page).

Offline zab

  • Jr. Member
  • **
  • Posts: 51
Re: Survival questions
« Reply #7 on: June 10, 2010, 09:00:57 AM »
Thanks a lot guys. You saved my day!