WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: run script on startup of tiny core  (Read 24596 times)

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
run script on startup of tiny core
« on: August 26, 2012, 12:37:54 AM »
Currently i have installed tiny core on my USB stick
I found that /mnt/sda1/cde/onboot.lst has a list of tcz file which get loaded on boot.
I edited it so that now it looks like
Code: [Select]
Xlibs.tcz
Xprogs.tcz
Xvesa.tcz
fltk-1.10.tcz
wbar.tcz
flwm_topside.tcz
Mplayer-nodeps.tcz
dosfstools.tcz
e2fsprogs.tcz
mtools.tcz
ntfs-3g.tcz
ntfsprogs.tcz
sun-jre.tcz
OSS-modules-3.0.21-tinycore.tcz
OSS.tcz
ncurses-common.tcz
ncurses.tcz
vim-7.2-bin.tcz
libxcb.tcz
libxml2.tcz
libffi.tcz
glib2.tcz
shared-mime-info.tcz
graphics-libs-1.tcz
gdk-pixbuf2.tcz
Xorg-7.6-lib.tcz
pango.tcz
expat2.tcz
fontconfig.tcz
pixman.tcz
cairo.tcz
atk.tcz
gtk2.tcz
dbus.tcz
dbus-glib.tcz
libnotify.tcz
curl.tcz
libasound.tcz
firefox.tcz
hicolor-icon-theme.tcz
gnome-icon-theme.tcz
opera-11.tcz
tree.tcz
ttf-bitstream-vera.tcz
leafpad.tcz
lxde-icon-theme.tcz
gamin.tcz
menu-cache.tcz
libfm.tcz
pcmanfm2.tcz
ossxmix.tcz
[color=red]I have firefox , opera , mplayer , leafpad , pcmanfm , vim , partition handling tools here[/color]
Now whenever i boot with my USB stick (without any restore option) , I get fresh distro (no backup of home folder) with desired applications pre-installed.
Currently , I run a script after fresh start to tweak my apps settings . It is as follows
Code: [Select]
\cp -f dep/* /tmp/tce/optional/
\cp -f .vimrc ~/
mkdir -p ~/.mplayer
\cp -f mplayerconfig ~/.mplayer/config
sudo cp *ttf /usr/share/fonts
cd ../complete-firefox-tc
./only-firefox-customise.txt
cd ../complete-opera
./only-opera-customise.txt
Is there some file which gets run after tcz have neen installed so that I can automate my startup script ?

There is no bootlocal.sh on my USB stick which means it gets dynamically created on startup .
« Last Edit: August 26, 2012, 12:42:35 AM by manit123 »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11703
Re: run script on startup of tiny core
« Reply #1 on: August 26, 2012, 12:51:37 AM »
Hi manit123
Quote
Is there some file which gets run after tcz have neen installed so that I can automate my startup script ?
That are directly accessible without a restore, not that I can think of. You could package the script as a personal
extension, and list it last in your onboot.lst.

Offline AbNoRMiS

  • Hero Member
  • *****
  • Posts: 550
  • nothing can be impeccable in this imperfect world
    • @ß№®M!$
Re: run script on startup of tiny core
« Reply #2 on: August 26, 2012, 04:47:57 AM »
« Last Edit: August 26, 2012, 04:58:22 AM by AbNoRMiS »
Basic Design Concept © @ß№®M!$
please forgive my terrible english :)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11703
Re: run script on startup of tiny core
« Reply #3 on: August 26, 2012, 09:34:33 AM »
Hi AbNoRMiS
If I understand the original post correctly, he is referring to booting using  norestore , so that won't work.

@manit123: Another possibility would be to have a persistent  /opt

Offline AbNoRMiS

  • Hero Member
  • *****
  • Posts: 550
  • nothing can be impeccable in this imperfect world
    • @ß№®M!$
Re: run script on startup of tiny core
« Reply #4 on: August 26, 2012, 11:52:09 AM »
sorry Rich, you're right
i mistakenly read "without any restore options" as "norestore options"
then really need or make your own extension
or use backup as most simple and correct solution
« Last Edit: August 26, 2012, 11:54:23 AM by AbNoRMiS »
Basic Design Concept © @ß№®M!$
please forgive my terrible english :)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: run script on startup of tiny core
« Reply #5 on: August 26, 2012, 02:43:47 PM »
- I think if you end up with a dir named cde there might be something wrong with your UFD install.
- Most of the entries in your onboot.lst are redundant, no extensions which ared dependencies of others need to be listed.

- Executables having a ".txt" suffix is bad practice!

- You could make a backup containing only bootlocal.sh (plus possibly the config files you want to restore).

- Excuse my ignorance but I can't understand what a backslash preceeding a command does, e.g. "\cp", I don't think I have ever noted such before.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline AbNoRMiS

  • Hero Member
  • *****
  • Posts: 550
  • nothing can be impeccable in this imperfect world
    • @ß№®M!$
Re: run script on startup of tiny core
« Reply #6 on: August 26, 2012, 02:52:55 PM »
- Excuse my ignorance but I can't understand what a backslash preceeding a command does, e.g. "\cp", I don't think I have ever noted such before.
perhaps it is vestiges of microsoft :)
Basic Design Concept © @ß№®M!$
please forgive my terrible english :)

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11703
Re: run script on startup of tiny core
« Reply #8 on: September 16, 2012, 09:03:53 AM »
Hi manit123
Good one. I had no idea you could override an alias that way.

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: run script on startup of tiny core
« Reply #9 on: September 16, 2012, 10:36:20 AM »
Code: [Select]
[quote]
Most of the entries in your onboot.lst are redundant, no extensions which ared dependencies of others need to be listed.
[/quote]

I think
onboot.lst should have list of extensions without any mention of dependency
If there is an entry called 'leafpad.tcz' then it should see
(1)if leafpad.tcz is already installed
(2)if not , is there a file named leafpad.tcz.dep
(3)if dep exists , do the same (1-4) for all something.tcz in that dep file
(4)you come across a basic tcz (has no dep file , say ncurses-common.tcz) then it should be installed after verifying md5sum with something.md5.txt .
[/code]
Does this happen ?

Currently I have no sth.dep or sth.md5.txt file in my 'optional' folder. I have just mounted them manually (which is a very inconvenient and crude way) in manner that happens when you run 'tce-load -wi application-name.tcz' ,

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: run script on startup of tiny core
« Reply #10 on: September 16, 2012, 12:04:25 PM »
Because they would be sth,tcz,dep and sth.tcz.md5.txt.

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: run script on startup of tiny core
« Reply #11 on: September 16, 2012, 12:16:47 PM »
after I copied sth.dep in optional folder , there is no need to mention order of dependencies or even their name . Just the name of app-file which we are installing suffice .
I think md5sum is optional .
Because I have no md5.txt in 'optional' folder . yet apps work fine.